95 #include "LuaEngine.h"
148 #pragma warning(disable:4355)
153 #pragma warning(default:4355)
371 sWorld->IncreasePlayerCount();
432 for (PlayerSpellMap::const_iterator itr =
m_spells.begin(); itr !=
m_spells.end(); ++itr)
435 for (PlayerTalentMap::const_iterator itr =
m_talents.begin(); itr !=
m_talents.end(); ++itr)
439 for (PlayerMails::iterator itr =
m_mail.begin(); itr !=
m_mail.end(); ++itr)
444 for (ItemMap::iterator iter =
mMitems.begin(); iter !=
mMitems.end(); ++iter)
457 sWorld->DecreasePlayerCount();
461 LOG_INFO(
"misc",
"Player::~Player (A1)");
464 LOG_INFO(
"misc",
"Player::~Player (A2)");
493 LOG_ERROR(
"entities.player",
"Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid race/class pair (%u/%u) - refusing to do so.",
506 LOG_ERROR(
"entities.player",
"Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid character class (%u) - refusing to do so (wrong DBC-files?)",
524 LOG_ERROR(
"entities.player",
"Player::Create: Possible hacking-attempt: Account %u tried creating a character named '%s' with an invalid gender (%u) - refusing to do so",
574 if (gm_level > start_level)
575 start_level = gm_level;
629 for (PlayerCreateInfoActions::const_iterator action_itr = info->
action.begin(); action_itr != info->
action.end(); ++action_itr)
630 addActionButton(action_itr->button, action_itr->action, action_itr->type);
637 if (oEntry->ItemId[j] <= 0)
640 uint32 itemId = oEntry->ItemId[j];
669 for (PlayerCreateInfoItems::const_iterator item_id_itr = info->
item.begin(); item_id_itr != info->
item.end(); ++item_id_itr)
714 LOG_DEBUG(
"entities.player.items",
"STORAGE: Creating initial item, itemId = %u, count = %u", titem_id, titem_amount);
717 while (titem_amount > 0)
729 if (titem_amount == 0)
743 LOG_ERROR(
"entities.player",
"STORAGE: Can't equip or store initial item %u for race %u class %u, error msg = %u", titem_id,
getRace(
true),
getClass(), msg);
757 data << CurrentValue;
819 LOG_DEBUG(
"entities.player",
"We are fall to death, loosing 10 percents durability");
844 for (AuraEffectList::const_iterator i = mModWaterBreathing.begin(); i != mModWaterBreathing.end(); ++i)
845 AddPct(UnderWaterTime, (*i)->GetAmount());
846 return UnderWaterTime;
981 uint8 drunk = currentDrunkValue ? --currentDrunkValue : 0;
1000 if (newDrunkValue > 100)
1001 newDrunkValue = 100;
1020 if (newDrunkenState == oldDrunkenState)
1071 else if (s ==
ALIVE)
1080 if (s ==
JUST_DIED && cur && ressSpellId)
1120 ObjectGuid guid = ObjectGuid::Create<HighGuid::Player>(guidLow);
1125 LOG_ERROR(
"entities.player",
"Player %s has incorrect race/class pair. Don't build enum.", guid.
ToString().c_str());
1130 LOG_ERROR(
"entities.player",
"Player (%s) has incorrect gender (%u), don't build enum.", guid.
ToString().c_str(), gender);
1177 if (fields[23].GetUInt32())
1181 if (!fields[25].GetString().empty())
1216 petFamily = creatureInfo->
family;
1224 Tokenizer equipment(fields[22].GetString(),
' ');
1227 uint32 visualBase = slot * 2;
1244 uint32 enchantId = 0x0000FFFF & (enchants >> enchantSlot * 16);
1303 sScriptMgr->AnticheatSetSkipOnePacketForASH(
this,
true);
1307 LOG_ERROR(
"entities.player",
"TeleportTo: invalid map (%d) or invalid coordinates (X: %f, Y: %f, Z: %f, O: %f) given when teleporting player (%s, name: %s, map: %d, X: %f, Y: %f, Z: %f, O: %f).",
1308 mapid,
x,
y,
z, orientation,
GetGUID().
ToString().c_str(),
GetName().c_str(),
GetMapId(),
GetPositionX(),
GetPositionY(),
GetPositionZ(),
GetOrientation());
1338 LOG_DEBUG(
"maps",
"Player %s using client without required expansion tried teleport to non accessible map %u",
GetName().c_str(), mapid);
1354 LOG_DEBUG(
"maps",
"Player %s is being teleported to map %u",
GetName().c_str(), mapid);
1398 if (!
sScriptMgr->OnBeforePlayerTeleport(
this, mapid,
x,
y,
z, orientation, options, target))
1401 if (
GetMapId() == mapid && !newInstance)
1641 g->SendUpdateToPlayer(
GetGUID());
1648 SeatMap::iterator itr = vehicle->GetSeatIteratorForPassenger(
this);
1649 if (itr != vehicle->Seats.end())
1650 if (
Unit* base = vehicle->GetBase())
1653 base->HandleSpellClick(
this, itr->first);
1698 for (ItemMap::iterator iter =
mMitems.begin(); iter !=
mMitems.end(); ++iter)
1699 iter->second->RemoveFromWorld();
1710 LOG_FATAL(
"entities.player",
"Player %s has viewpoint %u %u when removed from world",
GetName().c_str(), viewpoint->GetEntry(), viewpoint->GetTypeId());
1773 std::vector<AuraEffect*> auraList;
1777 auraList.reserve(ModRegenAuras.size() + ModPowerRegenAuras.size());
1778 auraList.insert(auraList.end(), ModRegenAuras.begin(), ModRegenAuras.end());
1779 auraList.insert(auraList.end(), ModPowerRegenAuras.begin(), ModPowerRegenAuras.end());
1781 for (
auto itr = auraList.begin(); itr != auraList.end(); ++itr)
1827 float addvalue = 0.0f;
1850 addvalue += -20 * RageDecreaseRate;
1862 addvalue += -30 * RunicPowerDecreaseRate;
1880 for (AuraEffectList::const_iterator i = ModPowerRegenPCTAuras.begin(); i != ModPowerRegenPCTAuras.end(); ++i)
1881 if (
Powers((*i)->GetMiscValue()) == power)
1882 AddPct(addvalue, (*i)->GetAmount());
1889 if (addvalue < 0.0f)
1894 else if (addvalue > 0.0f)
1896 if (curValue == maxValue)
1905 if (addvalue < 0.0f)
1907 if (curValue > integerValue)
1909 curValue -= integerValue;
1920 curValue += integerValue;
1922 if (curValue > maxValue)
1924 curValue = maxValue;
1941 if (curValue >= maxValue)
1949 float addvalue = 0.0f;
1961 for (AuraEffectList::const_iterator i = mModHealthRegenPct.begin(); i != mModHealthRegenPct.end(); ++i)
1962 AddPct(addvalue, (*i)->GetAmount());
2084 if (go->GetGoType() ==
type)
2086 if (go->IsWithinDistInMap(
this))
2091 LOG_DEBUG(
"maps",
"IsGameObjectOfTypeInRange: GameObject '%s' [%s] is too far away from player %s [%s] to be used by him (distance=%f, maximal 10 is allowed)",
2092 go->GetGOInfo()->name.c_str(), go->GetGUID().ToString().c_str(),
GetName().c_str(),
GetGUID().
ToString().c_str(), go->GetDistance(
this));
2124 static const float delta = 5.0f;
2133 if (dist > trigger->
radius + delta)
2160 pet->getHostileRefMgr().setOnlineOfflineState(
false);
2190 pet->getHostileRefMgr().setOnlineOfflineState(
true);
2194 if (
sWorld->IsFFAPvPRealm())
2209 const uint32 VISUAL_AURA = 37800;
2247 return p ==
this || (
GetGroup() !=
nullptr &&
2322 sScriptMgr->OnGivePlayerXP(
this, xp, victim);
2326 float favored_exp_mult = 0;
2327 if ((zone == 3483 || zone == 3562 || zone == 3836 || zone == 3713 || zone == 3714) && (
HasAura(32096) ||
HasAura(32098)))
2328 favored_exp_mult = 0.05f;
2330 xp =
uint32(xp * (1 + favored_exp_mult));
2353 SendLogXPGain(xp, victim, bonus_xp, recruitAFriend, group_rate);
2357 uint32 newXP = curXP + xp + bonus_xp;
2378 if (level == oldLevel)
2448 pet->SynchronizeLevelWithOwner();
2451 if (mailReward &&
sScriptMgr->CanGiveMailRewardAtGiveLevel(
this, level))
2474 sScriptMgr->OnPlayerLevelChanged(
this, oldLevel);
2538 for (
uint8 i = 0; i < 7; ++i)
2570 for (
uint8 i = 0; i < 7; ++i)
2600 for (
uint8 i = 0; i < 3; ++i)
2650 pet->SynchronizeLevelWithOwner();
2663 size_t countPos =
data.wpos();
2666 for (PlayerSpellMap::const_iterator itr =
m_spells.begin(); itr !=
m_spells.end(); ++itr)
2671 if (!itr->second->Active || !itr->second->IsInSpec(
GetActiveSpec()))
2696 for (PlayerTalentMap::iterator itr =
m_talents.begin(); itr !=
m_talents.end(); ++itr)
2706 if (itr->second->inSpellBook)
2721 if (!itr->second.needSendToClient)
2734 if (itr->second.end >= infTime)
2741 uint32 cooldown = itr->second.end > curTime ? itr->second.end - curTime : 0;
2742 data <<
uint32(itr->second.category ? 0 : cooldown);
2743 data <<
uint32(itr->second.category ? cooldown : 0);
2751 for (PlayerMails::iterator itr =
m_mail.begin(); itr !=
m_mail.end(); ++itr)
2753 if ((*itr)->messageID ==
id)
2790 if (deliver_time <= time(
nullptr))
2829 PlayerTalentMap::iterator itr =
m_talents.find(spellId);
2836 newTalent->
State = state;
2845 else if (!(itr->second->specMask & addSpecMask))
2847 itr->second->
specMask |= addSpecMask;
2859 PlayerTalentMap::iterator itr =
m_talents.find(spellId);
2869 itr->second->specMask &= ~specMask;
2872 if (itr->second->specMask == 0)
2900 if (spellInfo->
Effects[i].TriggerSpell > 0)
2949 if (!
_addSpell(spellId, addSpecMask, temporary, learnFromSkill))
2962 while (nextSpellInfo)
2964 PlayerSpellMap::iterator itr =
m_spells.find(nextSpellInfo->
Id);
2969 itr->second->Active =
false;
2981 PlayerSpellMap::iterator itr2 =
m_spells.find(spellInfo->
Id);
2983 itr2->second->Active =
false;
3003 PlayerSpellMap::iterator itr =
m_spells.find(spellId);
3018 if (spellInfo->
Effects[i].IsEffect())
3022 LOG_INFO(
"entities.player",
"TRYING TO LEARN SPELL WITH EFFECT LEARN: %u, PLAYER: %s", spellId,
GetGUID().
ToString().c_str());
3036 if (itr->second->State !=
PLAYERSPELL_REMOVED && (itr->second->specMask & addSpecMask) == addSpecMask)
3041 bool spellIsNew =
true;
3048 if (itr->second->State !=
PLAYERSPELL_NEW && (itr->second->specMask & addSpecMask) != addSpecMask)
3050 itr->second->Active =
true;
3051 itr->second->specMask |= addSpecMask;
3074 LOG_INFO(
"entities.player",
"TRYING TO LEARN SPELL WITH EFFECT LEARN 2: %u, PLAYER: %s", spellId,
GetGUID().
ToString().c_str());
3115 if (spellLearnSkill)
3121 if (skill_value < spellLearnSkill->
value)
3122 skill_value = spellLearnSkill->
value;
3123 if (skill_max_value < new_skill_max_value)
3124 skill_max_value = new_skill_max_value;
3126 SetSkill(spellLearnSkill->
skill, spellLearnSkill->
step, skill_value, skill_max_value);
3131 for (SkillLineAbilityMap::const_iterator _spell_idx = skill_bounds.first; _spell_idx != skill_bounds.second; ++_spell_idx)
3162 for (SkillLineAbilityMap::const_iterator _spell_idx = skill_bounds.first; _spell_idx != skill_bounds.second; ++_spell_idx)
3178 return (!spellInfo->
Stances || (form && (spellInfo->
Stances & (1 << (form - 1)))) ||
3187 LOG_ERROR(
"entities.player",
"Player (%s) tries to learn already active spell: %u",
GetGUID().
ToString().c_str(), spellId);
3196 sScriptMgr->OnPlayerLearnSpell(
this, spellId);
3208 PlayerSpellMap::iterator itr =
m_spells.find(nextSpell);
3215 for (SpellsRequiringSpellMap::const_iterator itr = spellsRequiringSpell.first; itr != spellsRequiringSpell.second; ++itr)
3217 PlayerSpellMap::iterator itr2 =
m_spells.find(itr->second);
3225 PlayerSpellMap::iterator itr =
m_spells.find(spell_id);
3230 if (itr->second->State ==
PLAYERSPELL_REMOVED || (itr->second->specMask & removeSpecMask) == 0)
3241 removeSpell(nextSpell, removeSpecMask, onlyTemporary);
3248 for (
auto spellsItr = spellsRequiringSpell.first; spellsItr != spellsRequiringSpell.second; ++spellsItr)
3250 removeSpell(spellsItr->second, removeSpecMask, onlyTemporary);
3259 itr->second->specMask = (((
uint8)itr->second->specMask) & ~removeSpecMask);
3262 if (
GetTalentSpellCost(firstRankSpellId) == 0 && !
sSpellMgr->IsAdditionalTalentSpell(firstRankSpellId) && itr->second->specMask == 0)
3288 if (spellInfo->
Effects[i].TriggerSpell > 0)
3308 if (spellLearnSkill)
3317 while (!prevSkill && prev_spell)
3319 prev_spell =
sSpellMgr->GetPrevSpellInChain(prev_spell);
3320 prevSkill =
sSpellMgr->GetSpellLearnSkill(
sSpellMgr->GetFirstSpellInChain(prev_spell));
3331 if (skill_value > prevSkill->
value)
3332 skill_value = prevSkill->
value;
3333 if (skill_max_value > new_skill_max_value)
3334 skill_max_value = new_skill_max_value;
3346 for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
3357 spellInfo->
Effects[i].CalcValue() == 310)
3371 sScriptMgr->OnPlayerForgotSpell(
this, spell_id);
3378 if (!checkAllSpells)
3384 for (PlayerSpellMap::iterator itr =
m_spells.begin(); itr !=
m_spells.end(); ++itr)
3390 if (itr->first == excludeSpellId)
3394 for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
3399 spellInfo =
sSpellMgr->AssertSpellInfo(itr->first);
3402 spellInfo->
Effects[i].CalcValue() == 310)
3426 for (SpellCategorySet::const_iterator i_scset = i_scstore->second.begin(); i_scset != i_scstore->second.end(); ++i_scset)
3434 SpellCooldowns::iterator itr,
next;
3453 if (removeActivePetCooldowns)
3457 for (CreatureSpellCooldowns::const_iterator itr2 = pet->m_CreatureSpellCooldowns.begin(); itr2 != pet->m_CreatureSpellCooldowns.end(); ++itr2)
3461 pet->m_CreatureSpellCooldowns.clear();
3471 if (itr->second.end < infTime)
3486 time_t curTime = time(
nullptr);
3495 bool needSend = fields[4].
GetBool();
3499 LOG_ERROR(
"entities.player",
"Player %s has unknown spell %u in `character_spell_cooldown`, skipping.",
GetGUID().
ToString().c_str(), spell_id);
3504 if (db_time <= curTime)
3509 LOG_DEBUG(
"entities.player.loading",
"Player (%s) spell %u, item %u cooldown loaded (%u secs).",
GetGUID().
ToString().c_str(), spell_id, item_id,
uint32(db_time - curTime));
3510 }
while (
result->NextRow());
3518 trans->Append(stmt);
3520 time_t curTime = time(
nullptr);
3524 bool first_round =
true;
3525 std::ostringstream ss;
3531 if (itr->first ==
uint32(-1))
3537 if (itr->second.end <= curMSTime + 1000)
3539 else if (itr->second.end <= infTime && (logout || itr->second.end > (curMSTime + 5 *
MINUTE *
IN_MILLISECONDS)))
3543 ss <<
"INSERT INTO character_spell_cooldown (guid, spell, category, item, time, needSend) VALUES ";
3544 first_round =
false;
3551 ss <<
'(' <<
GetGUID().
GetCounter() <<
',' << itr->first <<
',' << itr->second.category <<
"," << itr->second.itemid <<
',' << cooldown <<
',' << (itr->second.needSendToClient ?
'1' :
'0') <<
')';
3559 trans->Append(ss.str().c_str());
3581 return (new_cost < 10 *
GOLD ? 10 *
GOLD : new_cost);
3588 if (new_cost > 50 *
GOLD)
3589 new_cost = 50 *
GOLD;
3597 sScriptMgr->OnPlayerTalentsReset(
this, noResetCost);
3628 PlayerTalentMap::iterator itr = iter++;
3644 bool removed =
false;
3658 if (
sSpellMgr->IsAdditionalTalentSpell(spellInfo->
Effects[i].TriggerSpell))
3692 sScriptMgr->OnPlayerFreeTalentPointsChanged(
this, points);
3698 for (PlayerMails::iterator itr =
m_mail.begin(); itr !=
m_mail.end(); ++itr)
3700 if ((*itr)->messageID ==
id)
3772 PlayerSpellMap::const_iterator itr =
m_spells.find(spell);
3778 PlayerTalentMap::const_iterator itr =
m_talents.find(spell);
3784 PlayerSpellMap::const_iterator itr =
m_spells.find(spell);
3793 bool hasSpell =
true;
3829 if (prevSpell && !
HasSpell(prevSpell))
3834 for (SpellsRequiringSpellMap::const_iterator itr = spellsRequired.first; itr != spellsRequired.second; ++itr)
3870 updateRealmChars =
false;
3872 ObjectGuid playerGuid = ObjectGuid::Create<HighGuid::Player>(lowGuid);
3884 guild->DeleteMember(playerGuid,
false,
false,
true);
3904 switch (charDelete_method)
3917 std::unordered_map<uint32, std::vector<Item*>> itemsByMail;
3927 Field* fields = resultItems->Fetch();
3931 itemsByMail[mailId].push_back(mailItem);
3933 }
while (resultItems->NextRow());
3938 Field* mailFields = resultMail->Fetch();
3944 std::string subject = mailFields[4].
GetString();
3945 std::string body = mailFields[5].
GetString();
3947 bool has_items = mailFields[7].
GetBool();
3953 trans->Append(stmt);
3962 trans->Append(stmt);
3969 draft =
MailDraft(mailTemplateId,
false);
3971 auto itemsItr = itemsByMail.find(mail_id);
3972 if (itemsItr != itemsByMail.end())
3974 for (
Item* item : itemsItr->second)
3980 itemsByMail.erase(itemsItr);
3985 trans->Append(stmt);
3990 }
while (resultMail->NextRow());
4005 }
while (resultPets->NextRow());
4019 pFriend->GetSocial()->RemoveFromSocialList(playerGuid,
SOCIAL_FLAG_ALL);
4022 }
while (resultFriends->NextRow());
4027 trans->Append(stmt);
4031 trans->Append(stmt);
4035 trans->Append(stmt);
4039 trans->Append(stmt);
4043 trans->Append(stmt);
4047 trans->Append(stmt);
4051 trans->Append(stmt);
4055 trans->Append(stmt);
4059 trans->Append(stmt);
4063 trans->Append(stmt);
4067 trans->Append(stmt);
4071 trans->Append(stmt);
4075 trans->Append(stmt);
4079 trans->Append(stmt);
4085 trans->Append(stmt);
4091 trans->Append(stmt);
4096 trans->Append(stmt);
4100 trans->Append(stmt);
4104 trans->Append(stmt);
4108 trans->Append(stmt);
4112 trans->Append(stmt);
4116 trans->Append(stmt);
4120 trans->Append(stmt);
4124 trans->Append(stmt);
4128 trans->Append(stmt);
4132 trans->Append(stmt);
4137 trans->Append(stmt);
4141 trans->Append(stmt);
4145 trans->Append(stmt);
4149 trans->Append(stmt);
4153 trans->Append(stmt);
4157 trans->Append(stmt);
4161 trans->Append(stmt);
4165 trans->Append(stmt);
4169 trans->Append(stmt);
4173 trans->Append(stmt);
4193 LOG_ERROR(
"entities.player",
"Player::DeleteFromDB: Unsupported delete method: %u.", charDelete_method);
4197 if (updateRealmChars)
4198 sWorld->UpdateRealmCharCount(accountId);
4218 LOG_INFO(
"server.loading",
"Player::DeleteOldChars: Deleting all characters which have been deleted %u days before...", keepDays);
4227 LOG_INFO(
"server.loading",
"Player::DeleteOldChars: Found " UI64FMTD " character(s) to delete",
result->GetRowCount());
4232 }
while (
result->NextRow());
4254 LOG_ERROR(
"entities.player",
"Player::SetMovement: Unsupported move type (%d), data not sent to client.", pType);
4305 if (corpseReclaimDelay >= 0)
4341 if (restore_percent > 0.0f)
4356 bg->HandlePlayerResurrect(
this);
4362 sEluna->OnResurrect(
this);
4414 if (corpseReclaimDelay >= 0)
4437 uint32 _uf, _pb, _pb2, _cfb1, _cfb2;
4442 if (!corpse->
Create(
GetMap()->GenerateLowGuid<HighGuid::Corpse>(),
this))
4462 _cfb2 = ((face) | (hairstyle << 8) | (haircolor << 16) | (facialhair << 24));
4496 _cfi = iDisplayID | (iIventoryType << 24);
4507 if (!
GetMap()->IsBattlegroundOrArena())
4529 if (triggerSave && !
GetSession()->PlayerLogoutWithSave())
4537 trans->Append(stmt);
4570 for (
uint32 j = 0; j < pBag->GetBagSize(); j++)
4583 if (!pMaxDurability)
4586 uint32 pDurabilityLoss =
uint32(pMaxDurability * percent);
4588 if (pDurabilityLoss < 1)
4589 pDurabilityLoss = 1;
4614 for (
uint32 j = 0; j < pBag->GetBagSize(); j++)
4629 int32 pNewDurability = pOldDurability - points;
4631 if (pNewDurability < 0)
4633 else if (pNewDurability > pMaxDurability)
4634 pNewDurability = pMaxDurability;
4636 if (pOldDurability != pNewDurability)
4639 if (pNewDurability == 0 && pOldDurability > 0 && item->
IsEquipped())
4645 if (pNewDurability > 0 && pOldDurability == 0 && item->
IsEquipped())
4670 TotalCost +=
DurabilityRepair(((j << 8) | i), cost, discountMod, guildBank);
4690 uint32 LostDurability = maxDurability - curDurability;
4691 if (LostDurability > 0)
4698 LOG_ERROR(
"entities.player",
"RepairDurability: Wrong item lvl %u", ditemProto->
ItemLevel);
4704 if (!dQualitymodEntry)
4706 LOG_ERROR(
"entities.player",
"RepairDurability: Wrong dQualityModEntry %u", dQualitymodEntryId);
4776 ClosestGrave =
bg->GetClosestGraveyard(
this);
4797 data << ClosestGrave->
x;
4798 data << ClosestGrave->
y;
4799 data << ClosestGrave->
z;
4850 (*itr)->RemoveWatching(
this);
4857 LOG_ERROR(
"entities.player",
"ERROR in HandleBaseModValue(): non existed BaseModGroup!");
4897 LOG_ERROR(
"entities.player",
"trial to access non existed BaseModGroup!");
4911 LOG_ERROR(
"entities.player",
"wrong BaseModGroup in GetTotalBaseModValue()!");
4940 if (critBase ==
nullptr || critRatio ==
nullptr)
4944 return crit * 100.0f;
4988 if (dodgeRatio ==
nullptr || pclass >
MAX_CLASSES)
4996 diminishing = 100.0f * bonus_agility * dodgeRatio->
ratio * crit_to_dodge[pclass - 1];
4997 nondiminishing = 100.0f * (dodge_base[pclass - 1] + base_agility * dodgeRatio->
ratio * crit_to_dodge[pclass - 1]);
5010 if (critBase ==
nullptr || critRatio ==
nullptr)
5014 return crit * 100.0f;
5027 if (!Rating || !classRating)
5062 if (baseRatio ==
nullptr || moreRatio ==
nullptr)
5067 float baseSpirit = spirit;
5068 if (baseSpirit > 50)
5070 float moreSpirit = spirit - baseSpirit;
5071 float regen = baseSpirit * baseRatio->
ratio + moreSpirit * moreRatio->
ratio;
5085 if (moreRatio ==
nullptr)
5090 float regen = spirit * moreRatio->
ratio;
5102 float const oldVal = oldRating *
mult;
5133 if (tmpitem && !tmpitem->
IsBroken())
5146 SkillStatusMap::const_iterator itr =
mSkillStatus.find(skillid);
5179 if (newVal < currVal)
5189 if (newVal > currVal)
5212 if (pAbility->SkillLine ==
id)
5225 LOG_ERROR(
"entities.player",
"Skill not found in SkillLineStore: skill #%u",
id);
5236 itr->second.pos = i;
5247 for (AuraEffectList::const_iterator j = mModSkill.begin(); j != mModSkill.end(); ++j)
5248 if ((*j)->GetMiscValue() ==
int32(
id))
5253 for (AuraEffectList::const_iterator j = mModSkillTalent.begin(); j != mModSkillTalent.end(); ++j)
5254 if ((*j)->GetMiscValue() ==
int32(
id))
5271 SkillStatusMap::const_iterator itr =
mSkillStatus.find(skill);
5280 SkillStatusMap::const_iterator itr =
mSkillStatus.find(skill);
5292 SkillStatusMap::const_iterator itr =
mSkillStatus.find(skill);
5309 SkillStatusMap::const_iterator itr =
mSkillStatus.find(skill);
5327 SkillStatusMap::const_iterator itr =
mSkillStatus.find(skill);
5343 SkillStatusMap::const_iterator itr =
mSkillStatus.find(skill);
5357 SkillStatusMap::const_iterator itr =
mSkillStatus.find(skill);
5369 SkillStatusMap::const_iterator itr =
mSkillStatus.find(skill);
5381 SkillStatusMap::const_iterator itr =
mSkillStatus.find(skill);
5435 LOG_ERROR(
"entities.player",
"Spell action %u not added into button %u for player %s: spell not exist", action, button,
GetName().c_str());
5441 LOG_DEBUG(
"entities.player.loading",
"Player::IsActionButtonDataValid Spell action %u not added into button %u for player %s: player don't known this spell", action, button,
GetName().c_str());
5448 LOG_ERROR(
"entities.player",
"Item action %u not added into button %u for player %s: item not exist", action, button,
GetName().c_str());
5494 return &buttonItr->second;
5567 if (!
sScriptMgr->CanAreaExploreAndOutdoor(
this))
5575 LOG_ERROR(
"entities.player",
"Player '%s' (%s) discovered unknown area (x: %f y: %f z: %f map: %u)",
5591 if (!(currFields & val))
5613 int32 exploration_percent = (100 - ((
diff - 5) * 5));
5614 if (exploration_percent > 100)
5615 exploration_percent = 100;
5616 else if (exploration_percent < 0)
5617 exploration_percent = 0;
5638 switch (rEntry->TeamID)
5645 LOG_ERROR(
"entities.player",
"Race (%u) has wrong teamid (%u) in DBC: wrong DBC files?",
uint32(race), rEntry->TeamID);
5648 LOG_ERROR(
"entities.player",
"Race (%u) not found in DBC: wrong DBC files?",
uint32(race));
5675 float percent = 100.0f;
5683 percent += rep > 0 ? repMod : -repMod;
5707 if (percent <= 0.0f)
5713 float repRate = 0.0f;
5717 repRate = repData->creatureRate;
5720 repRate = repData->questRate;
5723 repRate = repData->questDailyRate;
5726 repRate = repData->questWeeklyRate;
5729 repRate = repData->questMonthlyRate;
5732 repRate = repData->questRepeatableRate;
5735 repRate = repData->spellRate;
5740 if (repRate <= 0.0f)
5765 uint32 ChampioningFaction = 0;
5773 if (dungeon->reclevel == 80)
5782 donerep1 =
int32(donerep1 * rate);
5793 donerep2 =
int32(donerep2 * rate);
5822 rep = questFactionRewEntry->QuestRewFactionValue[field];
5857 if (bonusTalentPoints)
5903 float honor_f = (float)honor;
5910 victim_guid = uVictim->
GetGUID();
5923 if (v_level <= k_grey)
5934 sScriptMgr->OnVictimRewardBefore(
this, victim, killer_title, victim_title);
5940 if (victim_title == 0)
5941 victim_guid.
Clear();
5942 else if (victim_title < 15)
5943 victim_rank = victim_title + 4;
5944 else if (victim_title < 29)
5945 victim_rank = victim_title - 14 + 4;
5947 victim_guid.
Clear();
5961 sScriptMgr->OnVictimRewardAfter(
this, victim, killer_title, victim_rank, honor_f);
5973 if (uVictim !=
nullptr)
5976 honor_f /= groupsize;
5984 honor =
int32(honor_f);
5992 data << victim_guid;
5993 data << victim_rank;
5996 if (uVictim || groupsize > 0)
6069 trans->Append(stmt);
6085 trans->Append(stmt);
6092 return playerData->guildId;
6099 return playerData->groupId;
6107 auto itr = playerData->arenaTeamId.find(slot);
6108 if (itr != playerData->arenaTeamId.end())
6126 uint32 id = (*result)[0].GetUInt32();
6156 fields = posResult->Fetch();
6185 return playerData->level;
6301 for (AuraApplicationMap::iterator i = itsAuras.begin(); i != itsAuras.end();)
6303 Aura const* aura = i->second->GetBase();
6311 for (AuraApplicationMap::iterator i = myAuras.begin(); i != myAuras.end();)
6313 Aura const* aura = i->second->GetBase();
6377 LOG_DEBUG(
"entities.player.items",
"_ApplyItemMods complete.");
6386 if (only_level_scale && !ssd)
6391 uint32 CustomScalingStatValue = 0;
6393 sScriptMgr->OnCustomScalingStatValueBefore(
this, proto, slot,
apply, CustomScalingStatValue);
6397 if (ssd && ssd_level > ssd->
MaxLevel)
6401 if (only_level_scale && !ssv)
6425 sScriptMgr->OnCustomScalingStatValue(
this, proto, statType, val, i, ScalingStatValue, ssv);
6669 int32 feral_bonus = 0;
6672 dpsMod = ssv->
getDPSMod(ScalingStatValue);
6677 sScriptMgr->OnGetFeralApBonus(
this, feral_bonus, dpsMod, proto, ssv);
6685 uint32 CustomScalingStatValue = 0;
6687 sScriptMgr->OnCustomScalingStatValueBefore(
this, proto, slot,
apply, CustomScalingStatValue);
6700 if (ssd && ssd_level > ssd->
MaxLevel)
6707 float damage = 0.0f;
6729 float average = extraDPS * proto->
Delay / 1000.0f;
6730 minDamage = 0.7f * average;
6731 maxDamage = 1.3f * average;
6768 for (AuraEffectList::const_iterator itr = auraCritList.begin(); itr != auraCritList.end(); ++itr)
6772 for (AuraEffectList::const_iterator itr = auraDamageFlatList.begin(); itr != auraDamageFlatList.end(); ++itr)
6776 for (AuraEffectList::const_iterator itr = auraDamagePctList.begin(); itr != auraDamagePctList.end(); ++itr)
6790 if (!
sScriptMgr->CanApplyWeaponDependentAuraDamageMod(
this, item, attackType, aura,
apply))
6887 constexpr std::array<uint32, 1> spellExceptions = { 11826 };
6888 const auto found =
std::find(std::begin(spellExceptions), std::end(spellExceptions), spellData.
SpellId);
6901 if (found != std::end(spellExceptions))
6920 if (!
sScriptMgr->CanApplyEquipSpell(
this, spellInfo, item,
apply, form_change))
6930 for (AuraApplicationMap::const_iterator itr = range.first; itr != range.second; ++itr)
6931 if (!item || itr->second->GetBase()->GetCastItemGUID() == item->
GetGUID())
6935 LOG_DEBUG(
"entities.player",
"WORLD: cast %s Equip spellId - %i", (item ?
"item" :
"itemset"), spellInfo->
Id);
6957 if (spellInfo->
Effects[i].TriggerSpell)
6969 if (!target || !target->
IsAlive() || target ==
this)
6981 if (!item->IsBroken())
7015 if (!
sScriptMgr->CanCastItemCombatSpell(
this, target, attType, procVictim, procEx, item, proto))
7037 LOG_ERROR(
"entities.player",
"WORLD: unknown Item spellid %i", spellData.
SpellId);
7052 else if (chance > 100.0f)
7077 if (entry && entry->
procEx)
7080 if ((entry->
procEx & procEx) == 0)
7094 LOG_ERROR(
"entities.player",
"Player::CastItemCombatSpell(%s, name: %s, enchant: %i): unknown spell %i is casted, ignoring...",
7141 if (!
sScriptMgr->CanCastItemUseSpell(
this, item, targets, cast_count, glyphIndex))
7154 LOG_ERROR(
"entities.player",
"Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring ", proto->
ItemId, learn_spell_id);
7170 std::list<Spell*> pushSpells;
7187 LOG_ERROR(
"entities.player",
"Player::CastItemUseSpell: Item (Entry: %u) in have wrong spell id %u, ignoring", proto->
ItemId, spellData.
SpellId);
7211 pushSpells.push_back(spell);
7232 LOG_ERROR(
"entities.player",
"Player::CastItemUseSpell Enchant %i, cast unknown spell %i", pEnchant->
ID, pEnchant->
spellid[s]);
7256 pushSpells.push_back(spell);
7264 for (std::list<Spell*>::const_iterator itr = pushSpells.begin(); itr != pushSpells.end(); ++itr)
7265 (*itr)->prepare(&targets);
7270 LOG_DEBUG(
"entities.player.items",
"_RemoveAllItemMods start.");
7313 LOG_DEBUG(
"entities.player.items",
"_RemoveAllItemMods complete.");
7318 LOG_DEBUG(
"entities.player.items",
"_ApplyAllItemMods start.");
7362 LOG_DEBUG(
"entities.player.items",
"_ApplyAllItemMods complete.");
7390 float currentAmmoDPS;
7394 currentAmmoDPS = 0.0f;
7398 sScriptMgr->OnApplyAmmoBonuses(
this, ammo_proto, currentAmmoDPS);
7453 if ((*itr).IsAnyTypeCreature())
7468 else if ((*itr).IsGameObject())
7602 switch (group->GetLootMethod())
7606 group->GroupLoot(loot, go);
7609 group->NeedBeforeGreed(loot, go);
7612 group->MasterLoot(loot, go);
7627 switch (group->GetLootMethod())
7702 loot = &bones->
loot;
7746 loot = &creature->
loot;
7786 if (!recipient && !recipientGroup)
7798 recipientGroup->
GroupLoot(loot, creature);
7859 else if (recipient ==
this)
7938 LOG_DEBUG(
"network",
"Sending SMSG_INIT_WORLD_STATES to Map: %u, Zone: %u", mapid, zoneid);
7944 size_t countPos =
data.wpos();
8042 bg->FillInitialWorldStates(
data);
8124 bg->FillInitialWorldStates(
data);
8139 bg->FillInitialWorldStates(
data);
8178 bg->FillInitialWorldStates(
data);
8351 bg->FillInitialWorldStates(
data);
8361 bg->FillInitialWorldStates(
data);
8371 bg->FillInitialWorldStates(
data);
8381 bg->FillInitialWorldStates(
data);
8391 bg->FillInitialWorldStates(
data);
8426 bg->FillInitialWorldStates(
data);
8436 bg->FillInitialWorldStates(
data);
8462 if (instance && mapid == 724)
8473 if (instance && mapid == 631)
8486 if (instance && mapid == 595)
8499 if (instance && mapid == 578)
8509 if (instance && mapid == 603)
8519 if (instance && mapid == 668)
8595 for (
uint32 i = 0; i < 2; ++i)
8605 if (rested_bonus > xp)
8610 LOG_DEBUG(
"entities.player",
"Player gain %u xp (+ %u Rested Bonus). Rested points=%f", xp + rested_bonus, rested_bonus,
GetRestBonus());
8611 return rested_bonus;
8642 LOG_ERROR(
"entities.player",
"Object (%s) is considered pet-like but doesn't have a charminfo!", pet->
GetGUID().
ToString().c_str());
8653 if (!pet_guid.IsPet())
8686 LOG_DEBUG(
"entities.pet",
"RemovePet %u, %u, %u", pet->
GetEntry(), mode, returnreagent);
8701 if (spellInfo->
Reagent[i] > 0)
8756 ((
Puppet*)charm)->UnSummon();
8778 std::string _text(text);
8781 if (!sEluna->OnChat(
this,
CHAT_MSG_SAY, language, _text))
8797 std::string _text(text);
8816 std::string _text(text);
8837 bool isAddonMessage = language ==
LANG_ADDON;
8839 if (!isAddonMessage)
8842 std::string _text(text);
8869 if (target->
isAFK())
8873 else if (target->
isDND())
8889 LOG_ERROR(
"entities.unit",
"Player::Whisper: `broadcast_text` was not %u found", textId);
8906 LOG_DEBUG(
"entities.pet",
"Pet Spells Groups");
8921 size_t spellsCountPos =
data.wpos();
8930 for (PetSpellMap::iterator itr = pet->
m_spells.begin(); itr != pet->
m_spells.end(); ++itr)
8940 data.put<
uint8>(spellsCountPos, addlist);
8950 uint16 category = itr->second.category;
8951 uint32 cooldown = (itr->second.end > curTime) ? itr->second.end - curTime : 0;
8957 if (itr->second.end >= infTime)
8981 LOG_ERROR(
"entities.player",
"Player::PossessSpellInitialize(): charm (%s) has no charminfo!", charm->
GetGUID().
ToString().c_str());
9027 if (!
sConditionMgr->IsObjectMeetToConditions(
this, vehicle, conditions))
9029 LOG_DEBUG(
"condition",
"VehicleSpellInitialize: conditions not met for Vehicle entry %u spell %u", vehicle->
ToCreature()->
GetEntry(), spellId);
9035 vehicle->
CastSpell(vehicle, spellId,
true);
9053 uint16 category = itr->second.category;
9054 uint32 cooldown = (itr->second.end > curTime) ? itr->second.end - curTime : 0;
9060 if (itr->second.end >= infTime)
9083 LOG_ERROR(
"entities.player",
"Player::CharmSpellInitialize(): the player's charm (%s) has no charminfo!", charm->
GetGUID().
ToString().c_str());
9145 if (!
mod || !spellInfo)
9166 if (
a->type !=
b->type)
9168 return a->value <
b->value;
9177 if (
a->type !=
b->type)
9179 if (
a->spellId == 44401)
9181 if (
b->spellId == 44401)
9183 return a->value <
b->value;
9189 LOG_DEBUG(
"spells.aura",
"Player::AddSpellMod %d",
mod->spellId);
9194 for (
int eff = 0; eff < 96; ++eff)
9196 if (eff != 0 && eff % 32 == 0)
9199 _mask[i] =
uint32(1) << (eff - (32 * i));
9200 if (
mod->mask & _mask)
9205 if ((*itr)->type ==
mod->type && (*itr)->mask & _mask)
9206 val += (*itr)->value;
9229 if (!
mod->ownerAura)
9240 std::list<Aura*> aurasQueue;
9249 if (!
mod->ownerAura || !
mod->ownerAura->IsUsingCharges())
9253 if (ownerAuraId && (ownerAuraId !=
mod->ownerAura->GetSpellInfo()->Id))
9256 if (aura &&
mod->ownerAura != aura)
9261 Spell::UsedSpellMods::iterator iterMod = spell->
m_appliedMods.find(
mod->ownerAura);
9272 aurasQueue.push_back(
mod->ownerAura);
9275 if (
mod->charges == -1)
9281 if (
mod->ownerAura->GetCharges() <
mod->charges)
9282 mod->charges =
mod->ownerAura->GetCharges();
9290 for (std::list<Aura*>::iterator itr = aurasQueue.begin(); itr != aurasQueue.end(); ++itr)
9292 Spell::UsedSpellMods::iterator iterMod = spell->
m_appliedMods.find(*itr);
9298 if (!ownerAuraId && !aura)
9327 if (!
mod->ownerAura || !
mod->ownerAura->IsUsingCharges())
9331 Spell::UsedSpellMods::iterator iterMod = spell->
m_appliedMods.find(
mod->ownerAura);
9366 if (spell &&
mod->ownerAura &&
mod->charges > 0)
9368 if (--
mod->charges == 0)
9409 for (SignatureContainer::iterator itr = signatureStore->begin(); itr != signatureStore->end(); ++itr)
9411 SignatureMap::iterator signItr = itr->second.signatureMap.find(guid);
9412 if (signItr != itr->second.signatureMap.end())
9419 itr->second.signatureMap.erase(signItr);
9447 trans->Append(stmt);
9451 trans->Append(stmt);
9461 trans->Append(stmt);
9466 trans->Append(stmt);
9488 if (arenaTeamId != 0)
9494 }
while (
result->NextRow());
9503 if (rest_bonus_new < 0)
9508 if (rest_bonus_new > rest_bonus_max)
9530 if (nodes.size() < 2)
9575 if (spell->m_spellInfo->Id != spellid)
9581 if (spell->m_spellInfo->Id != spellid)
9585 uint32 sourcenode = nodes[0];
9596 if (node->
x != 0.0f || node->
y != 0.0f || node->
z != 0.0f)
9637 uint32 prevnode = sourcenode;
9640 for (
uint32 i = 1; i < nodes.size(); ++i)
9644 lastnode = nodes[i];
9645 sObjectMgr->GetTaxiPath(prevnode, lastnode, path, cost);
9655 if (prevnode == sourcenode)
9660 prevnode = lastnode;
9672 if ((mount_display_id == 0 && spellid == 0) || sourcepath == 0)
9684 if (money < totalcost)
9722 std::vector<uint32> nodes;
9725 nodes[0] = entry->
from;
9726 nodes[1] = entry->
to;
9754 if (!mountDisplayId)
9765 float currDist = 0.0f;
9768 for (
uint32 i = 0; i < nodeList.size() - 1; ++i)
9778 if (currDist < bestDist)
9781 bestDist = currDist;
9810 for (PlayerSpellMap::const_iterator itr =
m_spells.begin(); itr !=
m_spells.end(); ++itr)
9814 uint32 unSpellId = itr->first;
9826 cooldowns[unSpellId] = unTimeMs;
9831 if (!cooldowns.empty())
9890 LOG_ERROR(
"entities.player",
"Player %s has incorrect race/class pair. Can't init display ids.",
GetGUID().
ToString().c_str());
9906 LOG_ERROR(
"entities.player",
"Invalid gender %u for player", gender);
9942 sScriptMgr->OnBeforeStoreOrEquipNewItem(
this, vendorslot, item,
count, bag, slot, pProto, pVendor, crItem, bStore);
9971 sScriptMgr->OnAfterStoreOrEquipNewItem(
this, vendorslot, it,
count, bag, slot, pProto, pVendor, crItem, bStore);
9979 sScriptMgr->OnBeforeBuyItemFromVendor(
this, vendorguid, vendorslot, item,
count, bag, slot);
10016 LOG_DEBUG(
"network",
"WORLD: BuyItemFromVendor - Unit (%s) not found or you can't interact with him.", vendorguid.
ToString().c_str());
10022 if (!
sConditionMgr->IsObjectMeetToConditions(
this, creature, conditions))
10030 if (!vItems || vItems->
Empty())
10044 if (!crItem || crItem->
item != item)
10158 uint32 max_personal_rating = 0;
10164 uint32 t_rating = at->GetRating();
10165 p_rating = p_rating < t_rating ? p_rating : t_rating;
10166 if (max_personal_rating < p_rating)
10167 max_personal_rating = p_rating;
10171 sScriptMgr->OnGetMaxPersonalArenaRatingRequirement(
this, minarenaslot, max_personal_rating);
10173 return max_personal_rating;
10193 if (
uint32(proto->Spells[
idx].SpellId) == spellInfo->
Id)
10195 cat = proto->Spells[
idx].SpellCategory;
10196 rec = proto->Spells[
idx].SpellCooldown;
10197 catrec = proto->Spells[
idx].SpellCategoryCooldown;
10205 if (rec < 0 && catrec < 0)
10215 bool needsCooldownPacket =
false;
10216 bool useSpellCooldown =
false;
10219 if (infinityCooldown)
10236 int32 oldRec = rec;
10240 useSpellCooldown =
true;
10254 needsCooldownPacket =
true;
10255 useSpellCooldown =
true;
10261 if (rec < 0) rec = 0;
10262 if (catrec < 0) catrec = 0;
10265 if (rec == 0 && catrec == 0)
10268 catrecTime = catrec ? catrec : 0;
10269 recTime = rec ? rec : catrecTime;
10273 if (cat && catrec > 0)
10275 _AddSpellCooldown(spellInfo->
Id, cat, itemId, useSpellCooldown? recTime : catrecTime,
true,
true);
10276 if (needsCooldownPacket)
10286 for (SpellCategorySet::const_iterator i_scset = i_scstore->second.begin(); i_scset != i_scstore->second.end(); ++i_scset)
10288 if (i_scset->second == spellInfo->
Id)
10294 if ((itemId > 0) != i_scset->first)
10317 if (needsCooldownPacket)
10351 _AddSpellCooldown(spellid, 0, itemid, end_time, needSendToClient, forceSendToSpectator);
10360 itr->second.end += cooldown;
10385 if (!enchantmentcondition)
10393 uint8 curcount[4] = {0, 0, 0, 0};
10430 for (
uint8 b = 0, tmpcolormask = 1;
b < 4;
b++, tmpcolormask <<= 1)
10432 if (tmpcolormask & GemColor)
10439 bool activate =
true;
10441 for (
uint8 i = 0; i < 5; i++)
10454 activate &= (_cur_gem < _cmp_gem);
10457 activate &= (_cur_gem > _cmp_gem);
10460 activate &= (_cur_gem >= _cmp_gem);
10465 LOG_DEBUG(
"entities.player.items",
"Checking Condition %u, there are %u Meta Gems, %u Red Gems, %u Yellow Gems and %u Blue Gems, Activate:%s", enchantmentcondition, curcount[0], curcount[1], curcount[2], curcount[3], activate ?
"yes" :
"no");
10476 if (slot == exceptslot)
10518 if (slot == exceptslot)
10556 for (std::vector<uint32>::const_iterator itr = taxi.begin(); itr != taxi.end(); ++itr)
10566 if (!auras.empty())
10699 return !(seerPlayer->duel && seerPlayer->duel->startTime != 0 && seerPlayer->duel->opponent ==
this);
10738 sScriptMgr->OnPlayerMoneyChanged(
this, amount);
10811 *comboPoints +=
count;
10816 target2->RemoveComboPointHolder(
GetGUID());
10819 *comboPoints =
count;
10824 if (*comboPoints > 5)
10826 else if (*comboPoints < 0)
10845 target->RemoveComboPointHolder(
GetGUID());
10852 if (group ==
nullptr)
10905 data.AppendPackedTime(
sWorld->GetGameTime());
10906 data << float(0.01666667f);
10934 static const AuraType auratypes[] =
10943 if (!auraList.empty())
10957 uint32 newzone, newarea;
10996 group->UpdatePlayerOutOfRange(
this);
11001 pet->ResetAuraUpdateMaskForRaid();
11038 else if (time > 900)
11040 else if (time > 300)
11116 for (PlayerSpellMap::const_iterator iter = spellMap.begin(); iter != spellMap.end(); ++iter)
11134 for (PlayerCreateInfoSpells::const_iterator itr = info->
customSpells.begin(); itr != info->
customSpells.end(); ++itr)
11137 LOG_DEBUG(
"entities.player.loading",
"Player::LearnCustomSpells: Player '%s' (%s, Class: %u Race: %u): Adding initial spell (SpellID: %u)",
11154 for (PlayerCreateInfoSkills::const_iterator itr = info->
skills.begin(); itr != info->
skills.end(); ++itr)
11156 uint32 skillId = itr->SkillId;
11182 skillValue = maxValue;
11186 skillValue = maxValue;
11201 SetSkill(skillId, 0, skillValue, maxValue);
11215 uint16 maxValue = tier->
Value[std::max<int32>(rank - 1, 0)];
11219 skillValue = maxValue;
11226 SetSkill(skillId, rank, skillValue, maxValue);
11246 bool found =
false;
11286 if (!pAbility || pAbility->
SkillLine != skill_id)
11325 bool skipCurrent =
false;
11327 for (
auto itr = bounds.first; itr != bounds.second; ++itr)
11331 skipCurrent =
true;
11374 for (Unit::VisibleAuraMap::const_iterator itr = visibleAuras->begin(); itr != visibleAuras->end(); ++itr)
11387 if (!qQuest->IsDFQuest())
11495 return (create || (
bg &&
bg->FindBgMap()) ?
bg :
nullptr);
11501 if (!
bg || !
bg->isArena())
11517 bg->IncreaseInvitedCount(teamId);
11541 if (level < bgt->GetMinLevel() || level > bgt->
GetMaxLevel())
11550 if (!vendor_faction || !vendor_faction->
faction)
11566 if (bounds.first == bounds.second)
11569 for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
11572 if (_spell_idx->second->RaceMask && (_spell_idx->second->RaceMask & racemask) == 0)
11576 if (_spell_idx->second->ClassMask && (_spell_idx->second->ClassMask & classmask) == 0)
11593 QuestStatusMap::const_iterator qs_itr =
m_QuestStatus.find(questid);
11636 bg->EventPlayerDroppedFlag(
this);
11751 LOG_ERROR(
"entities.player",
"HasItemFitToSpellRequirements: Not handled spell requirement for item class %u", spellInfo->
EquippedItemClass);
11779 Aura* aura = itr->second;
11813 for (AuraEffectList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
11816 if (prio < 2 && (*itr)->GetSpellInfo()->SpellVisual[0] == 99 && (*itr)->GetSpellInfo()->SpellIconID == 92)
11818 switch ((*itr)->GetId())
11842 LOG_ERROR(
"entities.player",
"Unhandled spell %u: S.Resurrection", (*itr)->GetId());
11870 if (v_level <= k_grey)
11885 bool recruitAFriend =
false;
11890 for (
GroupReference* itr = group->GetFirstMember(); itr !=
nullptr; itr = itr->
next())
11892 Player* player = itr->GetSource();
11893 if (!player || !player->
IsInMap(
this))
11913 if (ARecruitedB || BRecruitedA)
11915 recruitAFriend =
true;
11921 return recruitAFriend;
11931 if (!pRewardSource)
11939 for (
GroupReference* itr = group->GetFirstMember(); itr !=
nullptr; itr = itr->
next())
11941 Player* player = itr->GetSource();
11965 if (!pRewardSource || !player->
IsInMap(pRewardSource))
12061 if (
this != target)
12095 LOG_INFO(
"misc",
"Player::SetMover (A1) - %s, %u, %u, %u, %u, %u, %u, %u",
GetGUID().
ToString().c_str(),
GetMapId(),
GetInstanceId(),
FindMap()->
GetId(),
IsInWorld() ? 1 : 0,
IsDuringRemoveFromWorld() ? 1 : 0,
IsBeingTeleported() ? 1 : 0,
isBeingLoaded() ? 1 : 0);
12096 LOG_INFO(
"misc",
"Player::SetMover (A2) - %s, %u, %u, %u, %u, %u, %u, %u", target->
GetGUID().
ToString().c_str(), target->
GetMapId(), target->
GetInstanceId(), target->
FindMap()->
GetId(), target->
IsInWorld() ? 1 : 0, target->
IsDuringRemoveFromWorld() ? 1 : 0, (target->
ToPlayer() && target->
ToPlayer()->
IsBeingTeleported() ? 1 : 0), target->
isBeingLoaded() ? 1 : 0);
12097 LOG_INFO(
"misc",
"Player::SetMover (A3) - %s, %u, %u, %u, %u, %u, %u, %u", target->
m_movedByPlayer->
GetGUID().
ToString().c_str(), target->
m_movedByPlayer->
GetMapId(), target->
m_movedByPlayer->
GetInstanceId(), target->
m_movedByPlayer->
FindMap()->
GetId(), target->
m_movedByPlayer->
IsInWorld() ? 1 : 0, target->
m_movedByPlayer->
IsDuringRemoveFromWorld() ? 1 : 0, target->
m_movedByPlayer->
ToPlayer()->
IsBeingTeleported() ? 1 : 0, target->
m_movedByPlayer->
isBeingLoaded() ? 1 : 0);
12101 LOG_INFO(
"misc",
"Player::SetMover (B1) - %s, %u, %u, %u, %u, %u, %u, %u",
GetGUID().
ToString().c_str(),
GetMapId(),
GetInstanceId(),
FindMap()->
GetId(),
IsInWorld() ? 1 : 0,
IsDuringRemoveFromWorld() ? 1 : 0,
IsBeingTeleported() ? 1 : 0,
isBeingLoaded() ? 1 : 0);
12102 LOG_INFO(
"misc",
"Player::SetMover (B2) - %s, %u, %u, %u, %u, %u, %u, %u", target->
GetGUID().
ToString().c_str(), target->
GetMapId(), target->
GetInstanceId(), target->
FindMap()->
GetId(), target->
IsInWorld() ? 1 : 0, target->
IsDuringRemoveFromWorld() ? 1 : 0, (target->
ToPlayer() && target->
ToPlayer()->
IsBeingTeleported() ? 1 : 0), target->
isBeingLoaded() ? 1 : 0);
12119 time_t now = time(
nullptr);
12130 if (load && !corpse)
12154 time_t now = time(
nullptr);
12156 if (now >= expected_time)
12159 delay = expected_time - now;
12180 std::vector<Player*> nearMembers;
12185 Player* Target = itr->GetSource();
12190 nearMembers.push_back(Target);
12193 if (nearMembers.empty())
12196 uint32 randTarget =
urand(0, nearMembers.size() - 1);
12197 return nearMembers[randTarget];
12209 if (!
sLFGMgr->GetKicksLeft(gguid))
12227 if (itr->GetSource() && itr->GetSource()->IsInMap(
this) && itr->GetSource()->IsInCombat())
12234 int32 elapsedTime = dungeonCooldownAura->GetMaxDuration() - dungeonCooldownAura->GetDuration();
12279 LOG_INFO(
"misc",
"Player::SetBattlegroundOrBattlefieldRaid - current group is %s group!", (
GetGroup()->isBGGroup() ?
"BG" :
"BF"));
12304 if (group ==
nullptr)
12340 for (ItemPosCountVec::const_iterator itr =
vec.begin(); itr !=
vec.end(); ++itr)
12341 if (itr->pos ==
pos)
12374 LOG_FATAL(
"entities.player",
"Player::CreateViewpoint: Player %s cannot add new viewpoint!",
GetName().c_str());
12382 ((
Unit*)target)->AddPlayerToVision(
this);
12389 LOG_DEBUG(
"maps",
"Player::CreateViewpoint: Player %s remove seer",
GetName().c_str());
12392 ((
Unit*)target)->RemovePlayerFromVision(
this);
12396 LOG_FATAL(
"entities.player",
"Player::CreateViewpoint: Player %s cannot remove current viewpoint!",
GetName().c_str());
12420 if (playerFaction && faction && !playerFaction->
IsFriendlyTo(*faction))
12451 if ((hairstyle == newhairstyle) && (haircolor == newhaircolor) && (facialhair == newfacialhair) && (!newSkin || (newSkin->
hair_id == skincolor)))
12461 if (hairstyle != newhairstyle)
12464 if ((haircolor != newhaircolor) && (hairstyle == newhairstyle))
12465 cost += bsc->
cost * 0.5f;
12467 if (facialhair != newfacialhair)
12468 cost += bsc->
cost * 0.75f;
12470 if (newSkin && skincolor != newSkin->
hair_id)
12471 cost += bsc->
cost * 0.75f;
12488 value |= (0x01 | 0x02);
12506 for (AuraEffectList::const_iterator itr = immune.begin(); itr != immune.end(); ++itr)
12508 immuneMask |= (*itr)->GetMiscValue();
12520 uint32 fieldIndexOffset = bitIndex / 32;
12521 uint32 flag = 1 << (bitIndex % 32);
12565 for (AuraEffectList::const_iterator i = regenAura.begin(); i != regenAura.end(); ++i)
12567 if ((*i)->GetMiscValue() ==
POWER_RUNE && (*i)->GetMiscValueB() == rune)
12568 cooldown = cooldown * (100 - (*i)->GetAmount()) / 100;
12680 loot.
FillLoot (loot_id, store,
this,
true);
12683 for (
uint32 i = 0; i < max_slot; ++i)
12721 if (qitem ==
nullptr && ffaitem ==
nullptr && conditem ==
nullptr)
12794 sEluna->OnLootItem(
this, newitem, item->
count, this->GetLootGUID());
12796 sScriptMgr->OnLootItem(
this, newitem, item->
count, this->GetLootGUID());
12812 if (talentPointsForLevel > base_talent)
12813 talentPointsForLevel = base_talent;
12848 std::unordered_map<uint32, uint32> loadedSkillValues;
12861 LOG_ERROR(
"entities.player",
"Character %s has skill %u that does not exist.",
GetGUID().
ToString().c_str(), skill);
12882 LOG_ERROR(
"entities.player",
"Character %s has skill %u with value 0. Will be deleted.",
GetGUID().
ToString().c_str(), skill);
12899 if (skillTier->Value[skillStep] ==
max)
12914 loadedSkillValues[skill] =
value;
12923 }
while (
result->NextRow());
12927 for (
auto& skill : loadedSkillValues)
13007 if (limit_count > limitEntry->
maxCount)
13032 float damageperc = 0.018f * (z_diff - safe_fall) - 0.2426f;
13066 if (
IsAlive() && final_damage < original_health)
13116 if (CurTalentPoints == 0)
13127 if (!talentTabInfo)
13135 uint32 currentTalentRank = 0;
13140 currentTalentRank = rank + 1;
13146 if (currentTalentRank >= talentRank + 1)
13150 uint32 talentPointsChange = (talentRank - currentTalentRank + 1);
13151 if (CurTalentPoints < talentPointsChange)
13158 bool hasEnoughRank =
false;
13161 if (depTalentInfo->RankID[rank] != 0)
13164 hasEnoughRank =
true;
13170 if (!hasEnoughRank)
13177 if (talentInfo->
Row > 0)
13180 for (PlayerTalentMap::const_iterator itr = talentMap.begin(); itr != talentMap.end(); ++itr)
13183 if (itrTalentInfo->TalentTab == talentInfo->
TalentTab)
13185 spentPoints += talentPos->rank + 1;
13201 bool learned =
false;
13216 if (
sSpellMgr->IsAdditionalTalentSpell(spellInfo->
Effects[i].TriggerSpell))
13226 sEluna->OnLearnTalents(
this, talentId, talentRank, spellId);
13237 if (petGuid != pet->
GetGUID())
13242 if (CurTalentPoints == 0)
13255 if (!talentTabInfo)
13276 uint8 curtalent_maxrank = 0;
13281 curtalent_maxrank = (rank + 1);
13287 if (curtalent_maxrank >= (talentRank + 1))
13291 if (CurTalentPoints < (talentRank - curtalent_maxrank + 1))
13299 bool hasEnoughRank =
false;
13302 if (depTalentInfo->RankID[rank] != 0)
13303 if (pet->
HasSpell(depTalentInfo->RankID[rank]))
13304 hasEnoughRank =
true;
13306 if (!hasEnoughRank)
13315 if (talentInfo->
Row > 0)
13318 for (
uint32 i = 0; i < numRows; ++i)
13328 if (tmpTalent->
RankID[rank] != 0)
13332 spentPoints += (rank + 1);
13349 LOG_ERROR(
"entities.player",
"Talent.dbc have for talent: %u Rank: %u spell id = 0", talentId, talentRank);
13359 LOG_DEBUG(
"entities.player",
"PetTalentID: %u Rank: %u Spell: %u\n", talentId, talentRank, spellid);
13411 else if (spellid == 52150)
13429 if (clickPair.first == clickPair.second)
13432 for (SpellClickInfoContainer::const_iterator itr = clickPair.first; itr != clickPair.second; ++itr)
13434 if (!itr->second.IsFitToRequirements(
this,
c))
13457 uint8 talentIdCount = 0;
13462 for (PlayerTalentMap::const_iterator itr = talentMap.begin(); itr != talentMap.end(); ++itr)
13482 uint32 unspentTalentPoints = 0;
13483 size_t pointsPos =
data->wpos();
13486 uint8 talentIdCount = 0;
13487 size_t countPos =
data->wpos();
13496 data->put<
uint32>(pointsPos, unspentTalentPoints);
13509 if (!talentTabInfo)
13522 if (talentInfo->
TalentTab != talentTabId)
13526 int8 curtalent_maxrank = -1;
13531 curtalent_maxrank = rank;
13537 if (curtalent_maxrank < 0)
13546 data->put<
uint8>(countPos, talentIdCount);
13565 uint32 slotUsedMask = 0;
13566 size_t slotUsedMaskPos =
data->wpos();
13576 slotUsedMask |= (1 << i);
13580 uint16 enchantmentMask = 0;
13581 size_t enchantmentMaskPos =
data->wpos();
13591 enchantmentMask |= (1 << j);
13596 data->put<
uint16>(enchantmentMaskPos, enchantmentMask);
13603 data->put<
uint32>(slotUsedMaskPos, slotUsedMask);
13610 size_t count_pos =
data.wpos();
13617 data.appendPackGUID(itr->second.Guid);
13619 data << itr->second.Name;
13620 data << itr->second.IconName;
13624 if (itr->second.IgnoreMask & (1 << i))
13627 data.appendPackGUID(itr->second.Items[i] ? itr->second.Items[i].GetRawValue() :
uint64(0));
13638 if (eqset.
Guid != 0)
13640 bool found =
false;
13644 if ((itr->second.Guid == eqset.
Guid) && (itr->first ==
index))
13653 LOG_ERROR(
"entities.player",
"Player %s tried to save equipment set " UI64FMTD " (index %u), but that equipment set not found!",
GetName().c_str(), eqset.
Guid,
index);
13664 if (eqset.
Guid == 0)
13685 switch (eqset.
state)
13700 trans->Append(stmt);
13714 trans->Append(stmt);
13721 trans->Append(stmt);
13737 trans->Append(stmt);
13747 std::ostringstream ss(
"");
13756 trans->Append(stmt);
13763 if (itr->second.Guid == setGuid)
13859 int32 lowGuidOrSpawnId = 0;
13862 if (transport->IsMotionTransport())
13863 lowGuidOrSpawnId =
static_cast<int32>(transport->GetGUID().GetCounter());
13864 else if (transport->IsStaticTransport())
13865 lowGuidOrSpawnId = -
static_cast<int32>(transport->GetSpawnId());
13869 std::ostringstream ss;
13927 ss << item->GetEntry();
13969 if (m->IsDungeon())
13971 if (m->IsNonRaidDungeon()) dd = m->GetDifficulty();
13972 else rd = m->GetDifficulty();
13998 int32 lowGuidOrSpawnId = 0;
14001 if (transport->IsMotionTransport())
14002 lowGuidOrSpawnId =
static_cast<int32>(transport->GetGUID().GetCounter());
14003 else if (transport->IsStaticTransport())
14004 lowGuidOrSpawnId = -
static_cast<int32>(transport->GetSpawnId());
14008 std::ostringstream ss;
14066 ss << item->GetEntry();
14089 trans->Append(stmt);
14112 }
while (
result->NextRow());
14122 trans->Append(stmt);
14135 trans->Append(stmt);
14149 uint32 spellId = (*result)[0].GetUInt32();
14150 uint8 specMask = (*result)[1].GetUInt8();
14158 }
while (
result->NextRow());
14181 trans->Append(stmt);
14190 stmt->
setUInt8(2, itr->second->specMask);
14191 trans->Append(stmt);
14196 delete itr->second;
14238 std::unordered_set<uint32> removedSpecAuras;
14241 for (PlayerTalentMap::iterator itr =
m_talents.begin(); itr !=
m_talents.end(); ++itr)
14253 if (!itr->second->IsInSpec(spec) && !itr->second->inSpellBook)
14256 removedSpecAuras.insert(itr->first);
14265 removedSpecAuras.insert(glyphEntry->SpellId);
14270 uint32 spentTalents = 0;
14273 for (PlayerTalentMap::iterator itr =
m_talents.begin(); itr !=
m_talents.end(); ++itr)
14283 if (!itr->second->IsInSpec(oldSpec) && !itr->second->inSpellBook)
14288 spentTalents += talentPos->
rank + 1;
14290 removedSpecAuras.erase(itr->first);
14294 for (PlayerSpellMap::iterator itr =
m_spells.begin(); itr !=
m_spells.end(); ++itr)
14300 if (itr->second->IsInSpec(oldSpec) && !itr->second->IsInSpec(spec))
14306 removedSpecAuras.insert(itr->first);
14309 else if (!itr->second->IsInSpec(oldSpec) && itr->second->IsInSpec(spec))
14313 removedSpecAuras.erase(itr->first);
14328 removedSpecAuras.erase(glyphEntry->SpellId);
14338 if (!removedSpecAuras.empty())
14342 Aura* aura = iter->second;
14345 if (removedSpecAuras.find(triggeredByAuraSpellInfo->Id) != removedSpecAuras.end())
14370 if (Player* thisPlayer = mySess->GetPlayer())
14371 thisPlayer->LoadActions(result);
14396 for (AuraList::iterator iter = scAuras.begin(); iter != scAuras.end();)
14398 Aura* aura = *iter;
14402 iter = scAuras.begin();
14420 for (PlayerTalentMap::const_iterator itr = talentMap.begin(); itr != talentMap.end(); ++itr)
14424 if (tab->tabpage < 3)
14427 uint8 currentTalentRank = 0;
14429 if (talentInfo->RankID[rank] && itr->first == talentInfo->RankID[rank])
14431 currentTalentRank = rank + 1;
14434 specPoints[tab->tabpage] += currentTalentRank;
14440 uint32 specPoints[3] = {0, 0, 0};
14442 for (PlayerTalentMap::const_iterator itr = talentMap.begin(); itr != talentMap.end(); ++itr)
14446 if (tab->tabpage < 3)
14449 uint8 currentTalentRank = 0;
14451 if (talentInfo->RankID[rank] && itr->first == talentInfo->RankID[rank])
14453 currentTalentRank = rank + 1;
14456 specPoints[tab->tabpage] += currentTalentRank;
14458 uint8 maxIndex = 0;
14459 uint8 maxCount = specPoints[0];
14460 for (
uint8 i = 1; i < 3; ++i)
14461 if (specPoints[i] > maxCount)
14464 maxCount = specPoints[i];
14518 if (
sWorld->IsFFAPvPRealm())
14530 if (
bg->GetPlayers().find(
GetGUID()) !=
bg->GetPlayers().end())
14541 uint32 damage_type[4] = {0, 0, 0, 0};
14542 uint32 periodic_damage = 0;
14544 for (PlayerSpellMap::iterator itr =
m_spells.begin(); itr !=
m_spells.end(); ++itr)
14572 if ((
int32)damage_type[offset] < dmg)
14575 if (damage_type[1 + offset] < damage_type[offset])
14578 damage_type[1 + offset] = damage_type[offset];
14582 damage_type[offset] = dmg;
14584 else if ((
int32)damage_type[1 + offset] < dmg)
14590 damage_type[1 + offset] = dmg;
14650 LOG_DEBUG(
"entities.player.items",
"Item refund: item not refundable!");
14656 LOG_DEBUG(
"entities.player.items",
"Item refund: item was traded!");
14664 LOG_DEBUG(
"entities.player.items",
"Item refund: cannot find extendedcost data.");
14685 uint32 noSpaceForCount = 0;
14689 count -= noSpaceForCount;
14691 if (
count == 0 || dest.empty())
14710 LOG_DEBUG(
"entities.player.items",
"Item refund: item not refundable!");
14726 LOG_DEBUG(
"entities.player.items",
"Item refund: item was traded!");
14734 LOG_DEBUG(
"entities.player.items",
"Item refund: cannot find extendedcost data.");
14738 bool store_error =
false;
14744 if (
count && itemid)
14750 store_error =
true;
14794 if (
count && itemid)
14856 return std::max<float>(0.0f, sum / (
float)
count);
14874 sum += level * 2.33f;
14894 }
while (
result->NextRow());
14906 time_t curtime = time(
nullptr);
14932 trans->Append(stmt);
14945 trans->Append(stmt);
14953 trans->Append(stmt);
15078 Position pos(camitr->locations.x, camitr->locations.y, camitr->locations.z, camitr->locations.w);
15079 if (!
pos.IsPositionValid())
15084 m_mapRef->LoadGrid(camitr->locations.x, camitr->locations.y);
15113 return guildId ?
sGuildMgr->GetGuildById(guildId) :
nullptr;
15119 if (!
pos.IsPositionValid())
15144 uint32 mostTalentTabId = 0;
15145 uint32 mostTalentCount = 0;
15160 uint32 talentTabId = talentTabIds[i];
15168 if (talentInfo->
TalentTab != talentTabId)
15172 int8 curtalent_maxrank = -1;
15177 curtalent_maxrank = rank;
15183 if (curtalent_maxrank < 0)
15186 talentCount += curtalent_maxrank + 1;
15189 if (mostTalentCount < talentCount)
15191 mostTalentCount = talentCount;
15192 mostTalentTabId = talentTabId;
15196 return mostTalentTabId;
15411 std::string
color =
"";
#define SPECTATOR_SPELL_SPEED
#define SPECTATOR_COOLDOWN_MAX
#define SPECTATOR_COOLDOWN_MIN
@ ARENA_TEAM_PERSONAL_RATING
@ BATTLEFIELD_BATTLEID_WG
const uint32 ClockWorldState[2]
@ BATTLEFIELD_WG_WORLD_STATE_SHOW_WORLDSTATE
@ BATTLEFIELD_WG_WORLD_STATE_ACTIVE
@ BATTLEFIELD_WG_WORLD_STATE_DEFENDER
@ BATTLEFIELD_WG_WORLD_STATE_ATTACKER
@ BG_DESERTION_TYPE_LEAVE_BG
@ SPELL_AURA_PLAYER_INACTIVE
@ SPELL_RECENTLY_DROPPED_FLAG
NAME if(";${DISABLED_AC_MODULES};" MATCHES ";${MODULENAME};") continue() endif() if(EXISTS "$
@ CHANNEL_DBC_FLAG_CITY_ONLY
@ CHANNEL_DBC_FLAG_GUILD_REQ
@ CHANNEL_DBC_FLAG_ZONE_DEP
@ CHAR_DEL_QUEST_STATUS_DAILY_CHAR
@ CHAR_DEL_CHAR_SOCIAL_BY_FRIEND
@ CHAR_DEL_CHAR_PET_DECLINEDNAME_BY_OWNER
@ CHAR_SEL_CHAR_OLD_CHARS
@ CHAR_DEL_GUILD_BANK_EVENTLOG_BY_PLAYER
@ CHAR_SEL_CHAR_PET_BY_ENTRY_AND_SLOT_SYNS
@ CHAR_UPD_REM_AT_LOGIN_FLAG
@ CHAR_DEL_GUILD_EVENTLOG_BY_PLAYER
@ CHAR_DEL_CHAR_PET_BY_OWNER
@ CHAR_DEL_QUEST_STATUS_WEEKLY_CHAR
@ CHAR_DEL_ITEM_INSTANCE_BY_OWNER
@ CHAR_DEL_PETITION_SIGNATURE
@ CHAR_DEL_CHAR_DECLINED_NAME
@ CHAR_DEL_PETITION_SIGNATURE_BY_OWNER
@ CHAR_DEL_ALL_PETITION_SIGNATURES
@ CHAR_INS_BATTLEGROUND_RANDOM
@ CHAR_INS_PLAYER_ENTRY_POINT
@ CHAR_DEL_CHARACTER_SKILL
@ CHAR_SEL_ARENA_TEAM_ID_BY_PLAYER_GUID
@ CHAR_DEL_PLAYER_HOMEBIND
@ CHAR_DEL_CHAR_EQUIPMENTSETS
@ CHAR_SEL_CHARACTER_ACTIONS_SPEC
@ CHAR_DEL_PETITION_SIGNATURE_BY_OWNER_AND_TYPE
@ CHAR_REP_BREW_OF_THE_MONTH
@ CHAR_UDP_CHAR_ARENA_POINTS
@ CHAR_DEL_PLAYER_ACCOUNT_DATA
@ CHAR_DEL_QUEST_STATUS_SEASONAL_CHAR
@ CHAR_SEL_CHAR_POSITION_XYZ
@ CHAR_UDP_CHAR_HONOR_POINTS
@ CHAR_DEL_CHAR_INVENTORY
@ CHAR_DEL_ACCOUNT_INSTANCE_LOCK_TIMES
@ CHAR_DEL_QUEST_STATUS_MONTHLY_CHAR
@ CHAR_DEL_CHAR_QUESTSTATUS
@ CHAR_DEL_PLAYER_ENTRY_POINT
@ CHAR_DEL_CHAR_ACHIEVEMENTS
@ CHAR_SEL_CHAR_COD_ITEM_MAIL
@ CHAR_UPD_PLAYER_GM_TICKETS_ON_CHAR_DELETION
@ CHAR_UPD_ADD_AT_LOGIN_FLAG
@ CHAR_DEL_CHAR_REPUTATION
@ CHAR_DEL_CHAR_ACHIEVEMENT_PROGRESS
@ CHAR_DEL_CHAR_SPELL_COOLDOWN
@ CHAR_DEL_CHAR_TALENT_BY_SPELL
@ CHAR_DEL_CHAR_SOCIAL_BY_GUID
@ CHAR_UPD_CHAR_REMOVE_GHOST
@ CHAR_DEL_MAIL_ITEM_BY_ID
@ CHAR_INS_DESERTER_TRACK
@ CHAR_DEL_CHAR_QUESTSTATUS_REWARDED
@ CHAR_DEL_PETITION_BY_OWNER
@ CHAR_INS_ACCOUNT_INSTANCE_LOCK_TIMES
@ CHAR_DEL_PLAYER_GM_TICKETS
@ CHAR_DEL_PETITION_BY_OWNER_AND_TYPE
@ CHAR_SEL_PLAYER_ARENA_TEAMS
std::list< Condition * > ConditionList
@ CORPSE_RESURRECTABLE_PVE
@ CORPSE_RESURRECTABLE_PVP
@ CREATURE_FLAG_EXTRA_NO_XP
AchievementCriteriaTimedTypes
@ SKILL_FLAG_ALWAYS_MAX_VALUE
@ ITEM_ENCHANTMENT_TYPE_USE_SPELL
@ ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL
@ RAID_DIFFICULTY_10MAN_NORMAL
@ DUNGEON_DIFFICULTY_NORMAL
AchievementCriteriaCondition
@ ACHIEVEMENT_CRITERIA_CONDITION_NO_DEATH
@ SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE
@ SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN
@ ACHIEVEMENT_CRITERIA_TYPE_FLIGHT_PATHS_TAKEN
@ ACHIEVEMENT_CRITERIA_TYPE_REACH_SKILL_LEVEL
@ ACHIEVEMENT_CRITERIA_TYPE_FALL_WITHOUT_DYING
@ ACHIEVEMENT_CRITERIA_TYPE_DEATH_AT_MAP
@ ACHIEVEMENT_CRITERIA_TYPE_LEARN_SPELL
@ ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILLLINE_SPELLS
@ ACHIEVEMENT_CRITERIA_TYPE_REACH_LEVEL
@ ACHIEVEMENT_CRITERIA_TYPE_EARN_HONORABLE_KILL
@ ACHIEVEMENT_CRITERIA_TYPE_DEATHS_FROM
@ ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TRAVELLING
@ ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL
@ ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LINE
@ ACHIEVEMENT_CRITERIA_TYPE_GOLD_SPENT_FOR_TALENTS
@ ACHIEVEMENT_CRITERIA_TYPE_HK_RACE
@ ACHIEVEMENT_CRITERIA_TYPE_DEATH
@ ACHIEVEMENT_CRITERIA_TYPE_EXPLORE_AREA
@ ACHIEVEMENT_CRITERIA_TYPE_LEARN_SKILL_LEVEL
@ ACHIEVEMENT_CRITERIA_TYPE_DEATH_IN_DUNGEON
@ ACHIEVEMENT_CRITERIA_TYPE_WIN_DUEL
@ ACHIEVEMENT_CRITERIA_TYPE_ACCEPTED_SUMMONINGS
@ ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA
@ ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL
@ ACHIEVEMENT_CRITERIA_TYPE_NUMBER_OF_TALENT_RESETS
@ ACHIEVEMENT_CRITERIA_TYPE_HK_CLASS
@ ACHIEVEMENT_CRITERIA_TYPE_LOSE_DUEL
@ AREA_FLAG_ARENA_INSTANCE
@ AREA_FLAG_SLAVE_CAPITAL
#define DEFAULT_MAX_LEVEL
DBCStorage< TaxiNodesEntry > sTaxiNodesStore(TaxiNodesEntryfmt)
DBCStorage< TalentTabEntry > sTalentTabStore(TalentTabEntryfmt)
DBCStorage< GtRegenMPPerSptEntry > sGtRegenMPPerSptStore(GtRegenMPPerSptfmt)
DBCStorage< TaxiPathEntry > sTaxiPathStore(TaxiPathEntryfmt)
uint32 const * GetTalentTabPages(uint8 cls)
DBCStorage< GtChanceToMeleeCritBaseEntry > sGtChanceToMeleeCritBaseStore(GtChanceToMeleeCritBasefmt)
DBCStorage< ChrClassesEntry > sChrClassesStore(ChrClassesEntryfmt)
DBCStorage< ScalingStatValuesEntry > sScalingStatValuesStore(ScalingStatValuesfmt)
DBCStorage< ItemExtendedCostEntry > sItemExtendedCostStore(ItemExtendedCostEntryfmt)
SpellCategoryStore sSpellsByCategoryStore
DBCStorage< GlyphSlotEntry > sGlyphSlotStore(GlyphSlotfmt)
SkillRaceClassInfoEntry const * GetSkillRaceClassInfo(uint32 skill, uint8 race, uint8 class_)
DBCStorage< SpellItemEnchantmentConditionEntry > sSpellItemEnchantmentConditionStore(SpellItemEnchantmentConditionfmt)
DBCStorage< CurrencyTypesEntry > sCurrencyTypesStore(CurrencyTypesfmt)
std::unordered_map< uint32, FlyByCameraCollection > sFlyByCameraStore
DBCStorage< SpellItemEnchantmentEntry > sSpellItemEnchantmentStore(SpellItemEnchantmentfmt)
TaxiPathNodesByPath sTaxiPathNodesByPath
DBCStorage< BattlemasterListEntry > sBattlemasterListStore(BattlemasterListEntryfmt)
uint32 GetTalentSpellCost(uint32 spellId)
DBCStorage< CinematicSequencesEntry > sCinematicSequencesStore(CinematicSequencesEntryfmt)
DBCStorage< DurabilityCostsEntry > sDurabilityCostsStore(DurabilityCostsfmt)
DBCStorage< GtRegenHPPerSptEntry > sGtRegenHPPerSptStore(GtRegenHPPerSptfmt)
DBCStorage< FactionEntry > sFactionStore(FactionEntryfmt)
DBCStorage< SpellShapeshiftEntry > sSpellShapeshiftStore(SpellShapeshiftfmt)
uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId)
DBCStorage< QuestFactionRewEntry > sQuestFactionRewardStore(QuestFactionRewardfmt)
DBCStorage< ItemLimitCategoryEntry > sItemLimitCategoryStore(ItemLimitCategoryEntryfmt)
DBCStorage< CreatureFamilyEntry > sCreatureFamilyStore(CreatureFamilyfmt)
DBCStorage< GtChanceToSpellCritBaseEntry > sGtChanceToSpellCritBaseStore(GtChanceToSpellCritBasefmt)
DBCStorage< ChrRacesEntry > sChrRacesStore(ChrRacesEntryfmt)
TalentSpellPos const * GetTalentSpellPos(uint32 spellId)
DBCStorage< FactionTemplateEntry > sFactionTemplateStore(FactionTemplateEntryfmt)
DBCStorage< GemPropertiesEntry > sGemPropertiesStore(GemPropertiesEntryfmt)
DBCStorage< GtBarberShopCostBaseEntry > sGtBarberShopCostBaseStore(GtBarberShopCostBasefmt)
DBCStorage< DurabilityQualityEntry > sDurabilityQualityStore(DurabilityQualityfmt)
DBCStorage< GtCombatRatingsEntry > sGtCombatRatingsStore(GtCombatRatingsfmt)
DBCStorage< TalentEntry > sTalentStore(TalentEntryfmt)
DBCStorage< SkillTiersEntry > sSkillTiersStore(SkillTiersfmt)
DBCStorage< MapEntry > sMapStore(MapEntryfmt)
DBCStorage< AreaTableEntry > sAreaTableStore(AreaTableEntryfmt)
DBCStorage< SkillLineAbilityEntry > sSkillLineAbilityStore(SkillLineAbilityfmt)
DBCStorage< GtChanceToMeleeCritEntry > sGtChanceToMeleeCritStore(GtChanceToMeleeCritfmt)
DBCStorage< GtChanceToSpellCritEntry > sGtChanceToSpellCritStore(GtChanceToSpellCritfmt)
CharStartOutfitEntry const * GetCharStartOutfitEntry(uint8 race, uint8 class_, uint8 gender)
DBCStorage< ScalingStatDistributionEntry > sScalingStatDistributionStore(ScalingStatDistributionfmt)
LFGDungeonEntry const * GetLFGDungeon(uint32 mapId, Difficulty difficulty)
Returns LFGDungeonEntry for a specific map and difficulty. Will return first found entry if multiple ...
DBCStorage< GtOCTClassCombatRatingScalarEntry > sGtOCTClassCombatRatingScalarStore(GtOCTClassCombatRatingScalarfmt)
DBCStorage< SkillLineEntry > sSkillLineStore(SkillLinefmt)
DBCStorage< GlyphPropertiesEntry > sGlyphPropertiesStore(GlyphPropertiesfmt)
DBCStorage< GtOCTRegenHPEntry > sGtOCTRegenHPStore(GtOCTRegenHPfmt)
#define MAX_ITEM_EXTENDED_COST_REQUIREMENTS
std::vector< TaxiPathNodeEntry const * > TaxiPathNodeList
#define MAX_SPELL_REAGENTS
#define MAX_PET_TALENT_RANK
#define MAX_SPELL_ITEM_ENCHANTMENT_EFFECTS
#define MAX_SPELL_EFFECTS
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
SQLTransaction< CharacterDatabaseConnection > CharacterDatabaseTransaction
std::shared_ptr< PreparedResultSet > PreparedQueryResult
bool IsEventActive(uint16 event_id)
@ GUILD_MEMBER_DATA_LEVEL
@ CONFIG_BATTLEGROUND_REPORT_AFK_TIMER
@ CONFIG_CHARDELETE_METHOD
@ CONFIG_LFG_KICK_PREVENTION_TIMER
@ CONFIG_MAX_HONOR_POINTS
@ CONFIG_PVP_TOKEN_MAP_TYPE
@ CONFIG_CHARDELETE_MIN_LEVEL
@ CONFIG_MAX_ARENA_POINTS
@ CONFIG_START_HEROIC_PLAYER_LEVEL
@ CONFIG_MAX_PLAYER_LEVEL
@ CONFIG_START_ARENA_POINTS
@ CONFIG_DEATH_SICKNESS_LEVEL
@ CONFIG_START_PLAYER_MONEY
@ CONFIG_START_PLAYER_LEVEL
@ CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL
@ CONFIG_MAX_RECRUIT_A_FRIEND_BONUS_PLAYER_LEVEL_DIFFERENCE
@ CONFIG_GROUP_VISIBILITY
@ CONFIG_CHARDELETE_KEEP_DAYS
@ CONFIG_START_HONOR_POINTS
@ CONFIG_DISABLE_BREATHING
@ CONFIG_BATTLEGROUND_REPORT_AFK
@ CONFIG_HONOR_AFTER_DUEL
@ CONFIG_MAX_PRIMARY_TRADE_SKILL
@ CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT
@ CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVP
@ CONFIG_START_ALL_SPELLS
@ CONFIG_DECLINED_NAMES_USED
@ CONFIG_LFG_LOCATION_ALL
@ CONFIG_DEATH_CORPSE_RECLAIM_DELAY_PVE
@ CONFIG_PVP_TOKEN_ENABLE
@ CONFIG_ARENA_SEASON_IN_PROGRESS
@ CONFIG_NO_RESET_TALENT_COST
@ CONFIG_WINTERGRASP_ENABLE
@ CONFIG_BATTLEGROUND_TRACK_DESERTERS
@ CONFIG_VMAP_INDOOR_CHECK
@ CONFIG_DELETE_CHARACTER_TICKET_TRACE
@ CONFIG_START_ALL_EXPLORED
@ RATE_REPUTATION_LOWLEVEL_QUEST
@ RATE_REPUTATION_LOWLEVEL_KILL
@ RATE_POWER_RUNICPOWER_LOSS
@ RATE_REPUTATION_RECRUIT_A_FRIEND_BONUS
@ CONFIG_GROUP_XP_DISTANCE
@ CONFIG_LISTEN_RANGE_YELL
@ CONFIG_LISTEN_RANGE_SAY
@ CONFIG_MAX_RECRUIT_A_FRIEND_DISTANCE
@ CONFIG_LISTEN_RANGE_TEXTEMOTE
void AddItemsSetItem(Player *player, Item *item)
void RemoveItemsSetItem(Player *player, ItemTemplate const *proto)
@ BUY_ERR_DISTANCE_TOO_FAR
@ BUY_ERR_NOT_ENOUGHT_MONEY
@ BUY_ERR_REPUTATION_REQUIRE
@ BUY_ERR_ITEM_ALREADY_SOLD
@ PRISMATIC_ENCHANTMENT_SLOT
@ EQUIP_ERR_CANT_EQUIP_RANK
@ EQUIP_ERR_ITEM_MAX_LIMIT_CATEGORY_EQUIPPED_EXCEEDED
@ EQUIP_ERR_TOO_MUCH_GOLD
@ EQUIP_ERR_ALREADY_LOOTED
@ EQUIP_ERR_ITEM_UNIQUE_EQUIPABLE
@ EQUIP_ERR_ITEM_MAX_COUNT_EQUIPPED_SOCKETED
@ EQUIP_ERR_ITEM_CANT_BE_EQUIPPED
@ EQUIP_ERR_NOT_ENOUGH_HONOR_POINTS
@ EQUIP_ERR_ITEM_DOESNT_GO_TO_SLOT
@ EQUIP_ERR_VENDOR_MISSING_TURNINS
@ EQUIP_ERR_NOT_ENOUGH_ARENA_POINTS
@ ITEM_SUBCLASS_WEAPON_CROSSBOW
@ ITEM_SUBCLASS_WEAPON_GUN
@ ITEM_SUBCLASS_WEAPON_BOW
@ ITEM_FIELD_FLAG_REFUNDABLE
@ ITEM_SPELLTRIGGER_ON_USE
@ ITEM_SPELLTRIGGER_CHANCE_ON_HIT
@ ITEM_SPELLTRIGGER_ON_EQUIP
@ ITEM_FLAG_NO_EQUIP_COOLDOWN
@ ITEM_FLAG_UNIQUE_EQUIPPABLE
@ ITEM_FLAG_ITEM_PURCHASE_RECORD
@ ITEM_MOD_CRIT_TAKEN_RANGED_RATING
@ ITEM_MOD_HIT_MELEE_RATING
@ ITEM_MOD_HIT_TAKEN_MELEE_RATING
@ ITEM_MOD_HIT_SPELL_RATING
@ ITEM_MOD_SPELL_PENETRATION
@ ITEM_MOD_DEFENSE_SKILL_RATING
@ ITEM_MOD_HASTE_RANGED_RATING
@ ITEM_MOD_CRIT_TAKEN_RATING
@ ITEM_MOD_EXPERTISE_RATING
@ ITEM_MOD_RANGED_ATTACK_POWER
@ ITEM_MOD_CRIT_TAKEN_SPELL_RATING
@ ITEM_MOD_HIT_TAKEN_SPELL_RATING
@ ITEM_MOD_HASTE_SPELL_RATING
@ ITEM_MOD_HIT_RANGED_RATING
@ ITEM_MOD_CRIT_SPELL_RATING
@ ITEM_MOD_CRIT_RANGED_RATING
@ ITEM_MOD_CRIT_MELEE_RATING
@ ITEM_MOD_ARMOR_PENETRATION_RATING
@ ITEM_MOD_SPELL_HEALING_DONE
@ ITEM_MOD_CRIT_TAKEN_MELEE_RATING
@ ITEM_MOD_HIT_TAKEN_RATING
@ ITEM_MOD_HASTE_MELEE_RATING
@ ITEM_MOD_MANA_REGENERATION
@ ITEM_MOD_RESILIENCE_RATING
@ ITEM_MOD_SPELL_DAMAGE_DONE
@ ITEM_MOD_HIT_TAKEN_RANGED_RATING
uint8 ItemSubClassToDurabilityMultiplierId(uint32 ItemClass, uint32 ItemSubClass)
@ ITEM_SUBCLASS_ARMOR_MAIL
@ ITEM_SUBCLASS_ARMOR_CLOTH
@ ITEM_SUBCLASS_ARMOR_LEATHER
@ ITEM_SUBCLASS_ARMOR_SHIELD
@ ITEM_SUBCLASS_ARMOR_PLATE
@ ITEM_FLAGS_EXTRA_ALLIANCE_ONLY
@ ITEM_FLAGS_EXTRA_HORDE_ONLY
#define MAX_ITEM_PROTO_SPELLS
#define MAX_ITEM_PROTO_STATS
LootStore LootTemplates_Skinning("skinning_loot_template", "creature skinning id", true)
LootStore LootTemplates_Gameobject("gameobject_loot_template", "gameobject entry", true)
LootStore LootTemplates_Item("item_loot_template", "item entry", true)
LootStore LootTemplates_Milling("milling_loot_template", "item entry (herb)", true)
LootStore LootTemplates_Disenchant("disenchant_loot_template", "item disenchant id", true)
LootStore LootTemplates_Prospecting("prospecting_loot_template", "item entry (ore)", true)
LootStore LootTemplates_Creature("creature_loot_template", "creature entry", true)
LootStore LootTemplates_Pickpocketing("pickpocketing_loot_template", "creature pickpocket lootid", true)
@ LOOT_ERROR_ALREADY_PICKPOCKETED
@ MAIL_CHECK_MASK_COPIED
This mail was returned. Do not allow returning mail back again.
G3D::Matrix abs(const G3D::Matrix &M)
@ TEMPSUMMON_CORPSE_TIMED_DESPAWN
uint32 MAKE_PAIR32(uint16 l, uint16 h)
uint16 PAIR32_HIPART(uint32 x)
#define INTERACTION_DISTANCE
#define VISIBILITY_COMPENSATION
SkillRangeType GetSkillRangeType(SkillRaceClassInfoEntry const *rcEntry)
std::pair< SpellClickInfoContainer::const_iterator, SpellClickInfoContainer::const_iterator > SpellClickInfoMapBounds
std::optional< T > Optional
Optional helper class to wrap optional values within.
std::map< ObjectGuid, Signatures > SignatureContainer
@ CHAR_CUSTOMIZE_FLAG_RACE
@ CHAR_CUSTOMIZE_FLAG_NONE
@ CHAR_CUSTOMIZE_FLAG_FACTION
@ CHAR_CUSTOMIZE_FLAG_CUSTOMIZE
static RuneType runeSlotTypes[MAX_RUNES]
@ CHARACTER_FLAG_DECLINED
@ CHARACTER_FLAG_HIDE_HELM
@ CHARACTER_FLAG_HIDE_CLOAK
@ CHARACTER_FLAG_LOCKED_BY_BILLING
@ CHARACTER_LOCKED_FOR_TRANSFER
static uint32 copseReclaimDelay[MAX_DEATH_COUNT]
std::vector< ItemPosCount > ItemPosCountVec
@ TRAINER_SPELL_GREEN_DISABLED
@ TELE_TO_NOT_LEAVE_VEHICLE
@ TELE_TO_NOT_LEAVE_COMBAT
@ TELE_TO_NOT_UNSUMMON_PET
@ TELE_TO_NOT_LEAVE_TRANSPORT
#define PLAYER_SKILL_BONUS_INDEX(x)
EnviromentalDamage
Type of environmental damages.
#define PLAYER_SKILL_VALUE_INDEX(x)
#define KNOWN_TITLES_SIZE
@ PLAYER_FIELD_BYTE_RELEASE_TIMER
#define PLAYER_SKILL_INDEX(x)
@ TRANSFER_ABORT_DIFFICULTY
@ TRANSFER_ABORT_UNIQUE_MESSAGE
@ TRANSFER_ABORT_MAP_NOT_ALLOWED
@ TRANSFER_ABORT_INSUF_EXPAN_LVL
@ PLAYER_EXTRA_GM_INVISIBLE
@ PLAYER_EXTRA_HAS_310_FLYER
@ PLAYER_EXTRA_SHOW_DK_PET
@ PLAYER_EXTRA_SPECTATOR_ON
@ INVENTORY_SLOT_ITEM_START
@ INVENTORY_SLOT_ITEM_END
@ PLAYER_ALLOW_ONLY_ABILITY
@ PLAYER_FLAGS_HIDE_CLOAK
@ PLAYER_FLAGS_NO_XP_GAIN
@ PLAYER_FLAGS_IS_OUT_OF_BOUNDS
#define DEATH_EXPIRE_STEP
@ EQUIPMENT_SET_UNCHANGED
std::unordered_map< uint32, PlayerTalent * > PlayerTalentMap
@ DELAYED_BG_GROUP_RESTORE
Flag to restore group state after teleport from BG.
@ DELAYED_BG_MOUNT_RESTORE
Flag to restore mount state after teleport from BG.
@ DELAYED_VEHICLE_TELEPORT
@ DELAYED_BG_TAXI_RESTORE
Flag to restore taxi state after teleport from BG.
@ DELAYED_SPELL_CAST_DESERTER
@ DELAYED_RESURRECT_PLAYER
std::unordered_map< uint32, PlayerSpell * > PlayerSpellMap
#define SKILL_TEMP_BONUS(x)
@ INVENTORY_SLOT_BAG_START
#define DISABLED_MIRROR_TIMER
#define MAKE_SKILL_BONUS(t, p)
@ EQUIPMENT_SLOT_MAINHAND
@ UNDERWATER_EXIST_TIMERS
@ RAID_INSTANCE_WARNING_MIN
@ RAID_INSTANCE_WARNING_MIN_SOON
@ RAID_INSTANCE_WARNING_HOURS
#define PLAYER_MAX_DAILY_QUESTS
#define MAX_ACTION_BUTTONS
@ AT_LOGIN_CHANGE_FACTION
@ TALENT_TREE_HUNTER_SURVIVAL
@ TALENT_TREE_DEATH_KNIGHT_FROST
@ TALENT_TREE_PRIEST_SHADOW
@ TALENT_TREE_DEATH_KNIGHT_BLOOD
@ TALENT_TREE_DRUID_RESTORATION
@ TALENT_TREE_SHAMAN_ELEMENTAL
@ TALENT_TREE_SHAMAN_RESTORATION
@ TALENT_TREE_PALADIN_PROTECTION
@ TALENT_TREE_HUNTER_BEAST_MASTERY
@ TALENT_TREE_DRUID_FERAL_COMBAT
@ TALENT_TREE_WARLOCK_DEMONOLOGY
@ TALENT_TREE_WARRIOR_FURY
@ TALENT_TREE_WARLOCK_DESTRUCTION
@ TALENT_TREE_ROGUE_ASSASSINATION
@ TALENT_TREE_DEATH_KNIGHT_UNHOLY
@ TALENT_TREE_WARLOCK_AFFLICTION
@ TALENT_TREE_PRIEST_HOLY
@ TALENT_TREE_SHAMAN_ENHANCEMENT
@ TALENT_TREE_MAGE_ARCANE
@ TALENT_TREE_PALADIN_HOLY
@ TALENT_TREE_WARRIOR_ARMS
@ TALENT_TREE_DRUID_BALANCE
@ TALENT_TREE_ROGUE_COMBAT
@ TALENT_TREE_HUNTER_MARKSMANSHIP
@ TALENT_TREE_PALADIN_RETRIBUTION
@ TALENT_TREE_ROGUE_SUBTLETY
@ TALENT_TREE_WARRIOR_PROTECTION
@ TALENT_TREE_PRIEST_DISCIPLINE
@ REST_STATE_NOT_RAF_LINKED
#define PLAYER_MAX_SKILLS
#define INVENTORY_SLOT_BAG_0
#define PLAYER_EXPLORED_ZONES_SIZE
@ REPUTATION_SOURCE_SPELL
@ REPUTATION_SOURCE_QUEST
@ REPUTATION_SOURCE_MONTHLY_QUEST
@ REPUTATION_SOURCE_REPEATABLE_QUEST
@ REPUTATION_SOURCE_WEEKLY_QUEST
@ REPUTATION_SOURCE_DAILY_QUEST
#define MAKE_SKILL_VALUE(v, m)
#define MAX_ACTION_BUTTON_ACTION_VALUE
#define SKILL_PERM_BONUS(x)
G3D::Quat pow(const G3D::Quat &q, double x)
#define QUEST_OBJECTIVES_COUNT
#define MAX_QUEST_LOG_SIZE
@ QUEST_STATUS_INCOMPLETE
#define QUEST_REPUTATIONS_COUNT
@ SERVERSIDE_VISIBILITY_GM
@ GAMEOBJECT_TYPE_QUESTGIVER
@ CHAT_MSG_WHISPER_INFORM
@ SPELL_ATTR7_IGNORES_COLD_WEATHER_FLYING_REQUIREMENT
@ SPELL_ATTR7_ATTACK_ON_CHARGE_TO_UNIT
@ SPELL_EFFECT_ADD_EXTRA_ATTACKS
@ SPELL_EFFECT_TRADE_SKILL
@ SPELL_EFFECT_SCHOOL_DAMAGE
@ SPELL_EFFECT_LEARN_SPELL
@ SPELL_EFFECT_SKILL_STEP
#define CLASSMASK_WAND_USERS
@ SPELL_PREVENTION_TYPE_SILENCE
@ SPELL_ATTR5_NO_REAGENT_COST_WITH_AURA
constexpr auto MAX_SPELL_SCHOOL
@ BATTLEGROUND_QUEUE_NONE
@ CORPSE_DYNFLAG_LOOTABLE
@ SPELL_ATTR2_ALLOW_WHILE_NOT_SHAPESHIFTED
@ UNIT_DYNFLAG_REFER_A_FRIEND
#define MAX_GLYPH_SLOT_INDEX
@ SPELL_ATTR0_ONLY_OUTDOORS
@ SPELL_ATTR0_DO_NOT_DISPLAY
@ SPELL_ATTR0_NOT_IN_COMBAT_ONLY_PEACEFUL
@ AURA_STATE_HEALTHLESS_35_PERCENT
@ AURA_STATE_HEALTH_ABOVE_75_PERCENT
@ AURA_STATE_HEALTHLESS_20_PERCENT
@ ERR_TAXIUNSPECIFIEDSERVERERROR
@ ERR_TAXIPLAYERSHAPESHIFTED
@ ERR_TAXIPLAYERALREADYMOUNTED
#define PLAYER_MAX_BATTLEGROUND_QUEUES
@ SPELL_ATTR4_IGNORE_DEFAULT_ARENA_RESTRICTIONS
@ CREATURE_TYPE_FLAG_VISIBLE_TO_GHOSTS
@ CREATURE_TYPE_FLAG_INTERACT_WHILE_DEAD
@ ERR_PARTY_LFG_BOOT_LOOT_ROLLS
@ ERR_PARTY_LFG_BOOT_NOT_ELIGIBLE_S
@ ERR_PARTY_LFG_BOOT_LIMIT
@ ERR_PARTY_LFG_BOOT_DUNGEON_COMPLETE
@ ERR_PARTY_LFG_BOOT_IN_COMBAT
@ ERR_PARTY_LFG_BOOT_IN_PROGRESS
@ ERR_PARTY_LFG_BOOT_TOO_FEW_PLAYERS
@ SPELL_ATTR6_NO_CATEGORY_COOLDOWN_MODS
@ SPELL_SCHOOL_MASK_NORMAL
@ SPELL_SCHOOL_MASK_NATURE
@ SPELL_AURA_PREVENT_RESURRECTION
@ SPELL_AURA_RETAIN_COMBO_POINTS
@ SPELL_AURA_PERIODIC_DAMAGE
@ SPELL_AURA_PREVENT_DURABILITY_LOSS
@ SPELL_AURA_MOD_SHAPESHIFT
@ SPELL_AURA_MOD_WATER_BREATHING
@ SPELL_AURA_FEATHER_FALL
@ SPELL_AURA_MOD_REGEN_DURING_COMBAT
@ SPELL_AURA_MOD_POSSESS_PET
@ SPELL_AURA_MOD_INCREASE_SPEED
@ SPELL_AURA_CONVERT_RUNE
@ SPELL_AURA_INTERRUPT_REGEN
@ SPELL_AURA_MOD_POWER_REGEN
@ SPELL_AURA_MOD_HEALTH_REGEN_PERCENT
@ SPELL_AURA_MOD_HEALTH_REGEN_IN_COMBAT
@ SPELL_AURA_MOD_REPUTATION_GAIN
@ SPELL_AURA_MOD_FAKE_INEBRIATE
@ SPELL_AURA_MOD_DAMAGE_PERCENT_DONE
@ SPELL_AURA_SCHOOL_IMMUNITY
@ SPELL_AURA_MOD_HONOR_GAIN_PCT
@ SPELL_AURA_MOD_COOLDOWN
@ SPELL_AURA_MOD_WEAPON_CRIT_PERCENT
@ SPELL_AURA_WATER_BREATHING
@ SPELL_AURA_MOD_POWER_REGEN_PERCENT
@ SPELL_AURA_MOD_DAMAGE_DONE
@ SPELL_AURA_NO_PVP_CREDIT
@ SPELL_AURA_PREVENT_REGENERATE_POWER
@ SPELL_AURA_MOD_INCREASE_MOUNTED_FLIGHT_SPEED
@ SPELL_AURA_MOD_FACTION_REPUTATION_GAIN
@ SPELL_AURA_MOD_SKILL_TALENT
@ AURA_EFFECT_HANDLE_REAL
@ AURA_EFFECT_HANDLE_SKILL
@ AURA_EFFECT_HANDLE_SEND_FOR_CLIENT
bool IsProfessionOrRidingSkill(uint32 skill)
std::pair< SpellsRequiringSpellMap::const_iterator, SpellsRequiringSpellMap::const_iterator > SpellsRequiringSpellMapBounds
std::pair< SkillLineAbilityMap::const_iterator, SkillLineAbilityMap::const_iterator > SkillLineAbilityMapBounds
@ AURA_INTERRUPT_FLAG_MOVE
@ AURA_INTERRUPT_FLAG_TURNING
@ AURA_INTERRUPT_FLAG_NOT_ABOVEWATER
@ AURA_INTERRUPT_FLAG_NOT_SEATED
@ AURA_INTERRUPT_FLAG_NOT_UNDERWATER
@ AURA_INTERRUPT_FLAG_CHANGE_MAP
@ MOVEMENTFLAG_ONTRANSPORT
@ MOVEMENTFLAG_MASK_HAS_PLAYER_STATUS_OPCODE
Movement flags that have change status opcodes associated for players.
static constexpr uint32 infinityCooldownDelayCheck
#define MAX_UNIT_ACTION_BAR_INDEX
@ SPELLMOD_CHANCE_OF_SUCCESS
@ UNIT_MOD_DAMAGE_OFFHAND
@ UNIT_MOD_STAT_INTELLECT
@ UNIT_MOD_RESISTANCE_SHADOW
@ UNIT_MOD_RESISTANCE_FROST
@ UNIT_MOD_RESISTANCE_HOLY
@ UNIT_MOD_RESISTANCE_ARCANE
@ UNIT_MOD_RESISTANCE_FIRE
@ UNIT_MOD_RESISTANCE_NATURE
@ UNIT_MOD_DAMAGE_MAINHAND
@ UNIT_MOD_ATTACK_POWER_RANGED
@ UNIT_BYTE1_FLAG_ALWAYS_STAND
static constexpr uint32 infinityCooldownDelay
@ SPELL_COOLDOWN_FLAG_NONE
#define MAX_COMBAT_RATING
@ OFFHAND_CRIT_PERCENTAGE
@ TRIGGERED_FULL_MASK
Will return SPELL_FAILED_DONT_REPORT in CheckCast functions.
@ TRIGGERED_IGNORE_SPELL_AND_CATEGORY_CD
Will ignore GCD.
@ TRIGGERED_IGNORE_CASTER_AURASTATE
Will ignore shapeshift checks.
@ TRIGGERED_IGNORE_SHAPESHIFT
Will not adjust facing to target (if any)
#define MAKE_UNIT_ACTION_BUTTON(A, T)
#define CURRENT_MAX_SPELL
@ UNIT_BYTES_1_OFFSET_ANIM_TIER
@ UNIT_NPC_FLAG_QUESTGIVER
@ UNIT_NPC_FLAG_SPELLCLICK
@ UNIT_NPC_FLAG_TRAINER_CLASS
@ CURRENT_CHANNELED_SPELL
@ CURRENT_AUTOREPEAT_SPELL
static constexpr uint32 MAX_CREATURE_SPELLS
std::unordered_map< uint32, uint32 > PacketCooldowns
@ UNIT_BYTE2_FLAG_FFA_PVP
@ UNIT_BYTE2_FLAG_SANCTUARY
#define MAX_SPELL_CONTROL_BAR
@ UNIT_FLAG_NON_ATTACKABLE
@ UNIT_FLAG_IMMUNE_TO_NPC
@ UNIT_FLAG_NOT_SELECTABLE
@ UNIT_FLAG_NOT_ATTACKABLE_1
@ UNIT_FLAG_PLAYER_CONTROLLED
@ UNIT_FLAG_PET_IN_COMBAT
@ UNIT_FLAG2_ALLOW_CHEAT_SPELLS
@ UNIT_FLAG2_REGENERATE_POWER
@ CORPSE_FIELD_DISPLAY_ID
@ CORPSE_FIELD_DYNAMIC_FLAGS
@ PLAYER_FIELD_MOD_DAMAGE_DONE_POS
@ PLAYER_FIELD_TODAY_CONTRIBUTION
@ PLAYER_RANGED_CRIT_PERCENTAGE
@ PLAYER_SPELL_CRIT_PERCENTAGE1
@ PLAYER_FIELD_DAILY_QUESTS_1
@ PLAYER_FIELD_ARENA_CURRENCY
@ PLAYER_FIELD_COMBAT_RATING_1
@ UNIT_FIELD_POWER_COST_MODIFIER
@ UNIT_FIELD_RANGEDATTACKTIME
@ UNIT_FIELD_ATTACK_POWER_MODS
@ PLAYER_PARRY_PERCENTAGE
@ PLAYER_NO_REAGENT_COST_1
@ PLAYER_OFFHAND_CRIT_PERCENTAGE
@ PLAYER_FIELD_MOD_TARGET_RESISTANCE
@ PLAYER_EXPLORED_ZONES_1
@ PLAYER_FIELD_HONOR_CURRENCY
@ PLAYER_FIELD_KNOWN_CURRENCIES
@ PLAYER_BLOCK_PERCENTAGE
@ UNIT_FIELD_RANGED_ATTACK_POWER
@ UNIT_FIELD_RANGED_ATTACK_POWER_MULTIPLIER
@ UNIT_FIELD_MAXOFFHANDDAMAGE
@ UNIT_FIELD_MOUNTDISPLAYID
@ PLAYER__FIELD_KNOWN_TITLES
@ UNIT_FIELD_MAXRANGEDDAMAGE
@ PLAYER_DODGE_PERCENTAGE
@ UNIT_FIELD_ATTACK_POWER_MULTIPLIER
@ UNIT_FIELD_ATTACK_POWER
@ PLAYER_OFFHAND_EXPERTISE
@ PLAYER_FIELD_ARENA_TEAM_INFO_1_1
@ PLAYER_FIELD_MOD_HEALING_DONE_POS
@ PLAYER_CHARACTER_POINTS1
@ PLAYER_FIELD_YESTERDAY_CONTRIBUTION
@ UNIT_FIELD_MINRANGEDDAMAGE
@ PLAYER_FIELD_WATCHED_FACTION_INDEX
@ PLAYER_VISIBLE_ITEM_1_ENTRYID
@ PLAYER_FIELD_LIFETIME_HONORABLE_KILLS
@ UNIT_FIELD_RANGED_ATTACK_POWER_MODS
@ PLAYER_FIELD_MOD_DAMAGE_DONE_PCT
@ UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER
@ UNIT_FIELD_POWER_COST_MULTIPLIER
@ PLAYER_FIELD_MOD_DAMAGE_DONE_NEG
@ PLAYER_REST_STATE_EXPERIENCE
@ UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER
@ UNIT_FIELD_MINOFFHANDDAMAGE
@ UNIT_FIELD_BASEATTACKTIME
@ PLAYER_FIELD_MOD_TARGET_PHYSICAL_RESISTANCE
@ ITEM_FIELD_MAXDURABILITY
static uint pos(unsigned char c)
void StartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry, uint32 timeLost=0)
void ResetAchievementCriteria(AchievementCriteriaCondition condition, uint32 value, bool evenIfCriteriaComplete=false)
bool HasAchieved(uint32 achievementId) const
void CompletedAchievement(AchievementEntry const *entry)
void SendAllAchievementData() const
void CheckAllAchievementCriteria()
void SendRespondInspectAchievements(Player *player) const
void RemoveTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
void DelMember(ObjectGuid guid, bool cleanDb)
T & AddCallback(T &&query)
void BuildUpdatePacket(ByteBuffer &data, bool remove) const
AuraType GetAuraType() const
SpellInfo const * GetSpellInfo() const
int32 GetMiscValue() const
ObjectGuid GetCasterGUID() const
SpellInfo const * GetSpellInfo() const
time_t GetApplyTime() const
SpellInfo const * GetTriggeredByAuraSpellInfo() const
virtual void Remove(AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)=0
virtual void FillInitialWorldStates(WorldPacket &)=0
bool IsWarTime()
Return true if battle is start, false if battle is not started.
uint32 GetMaxLevel() const
static bool IsBGWeekend(BattlegroundTypeId bgTypeId)
void LeaveChannel(Player *player, bool send=true)
std::string Name
User specified variables.
void PSendSysMessage(char const *fmt, Args &&... args)
virtual void SendSysMessage(std::string_view str, bool escapeCharacters=false)
static size_t BuildChatPacket(WorldPacket &data, ChatMsg chatType, Language language, ObjectGuid senderGUID, ObjectGuid receiverGUID, std::string_view message, uint8 chatTag, std::string const &senderName="", std::string const &receiverName="", uint32 achievementId=0, bool gmMessage=false, std::string const &channelName="")
time_t const & GetGhostTime() const
bool Create(ObjectGuid::LowType guidlow)
void RemoveFromWorld() override
CorpseType GetType() const
void DeleteFromDB(CharacterDatabaseTransaction trans)
VendorItemData const * GetVendorItems() const
bool IsReputationGainDisabled() const
uint32 m_spells[MAX_CREATURE_SPELLS]
void SetLootRecipient(Unit *unit, bool withGroup=true)
void GetHomePosition(float &x, float &y, float &z, float &ori) const
void GetTransportHomePosition(float &x, float &y, float &z, float &ori) const
ObjectGuid GetLootRecipientGUID() const
CreatureSpellCooldowns m_CreatureSpellCooldowns
void SetPickPocketLootTime()
bool hasLootRecipient() const
Player * GetLootRecipient() const
bool CanGeneratePickPocketLoot() const
uint32 UpdateVendorItemCurrentCount(VendorItem const *vItem, uint32 used_count)
uint32 GetVendorItemCurrentCount(VendorItem const *vItem)
Group * GetLootRecipientGroup() const
ReactStates GetReactState() const
CreatureTemplate const * GetCreatureTemplate() const
bool IsRacialLeader() const
Class used to access individual fields of database query result.
std::string GetString() const
void AddFlag(FLAG_TYPE flag)
void DelFlag(FLAG_TYPE flag)
void SetValue(FLAG_TYPE flag, T_VALUES value)
uint32 GetRespawnDelay() const
bool IsWithinDistInMap(Player const *player) const
LootState getLootState() const
bool isSpawnedByDefault() const
time_t GetRespawnTime() const
uint32 GetLootGenerationTime() const
void SetLootState(LootState s, Unit *unit=nullptr)
void GetFishLootJunk(Loot *loot, Player *loot_owner)
ObjectGuid GetOwnerGUID() const
GameobjectTypes GetGoType() const
void GetFishLoot(Loot *loot, Player *loot_owner)
GameObjectTemplateAddon const * GetTemplateAddon() const
void SetLootGenerationTime()
GameObjectTemplate const * GetGOInfo() const
uint16 GetLootMode() const
void NeedBeforeGreed(Loot *loot, WorldObject *pLootedObject)
ObjectGuid GetMasterLooterGuid() const
bool isLFGGroup(bool restricted=false) const
GroupReference * GetFirstMember()
bool IsAssistant(ObjectGuid guid) const
bool isRollLootActive() const
void GroupLoot(Loot *loot, WorldObject *pLootedObject)
void Disband(bool hideDestroy=false)
bool IsLeader(ObjectGuid guid) const
ObjectGuid GetGUID() const
void RemoveInvite(Player *player)
uint32 GetMembersCount() const
bool RemoveMember(ObjectGuid guid, const RemoveMethod &method=GROUP_REMOVEMETHOD_DEFAULT, ObjectGuid kicker=ObjectGuid::Empty, const char *reason=nullptr)
LootMethod GetLootMethod() const
void UpdateLooterGuid(WorldObject *pLootedObject, bool ifneed=false)
bool SameSubGroup(ObjectGuid guid1, ObjectGuid guid2) const
void MasterLoot(Loot *loot, WorldObject *pLootedObject)
void setSubGroup(uint8 pSubGroup)
bool HandleMemberWithdrawMoney(WorldSession *session, uint32 amount, bool repair=false)
void setOnlineOfflineState(bool isOnline)
void updateThreatTables()
time_t GetExtendedResetTime() const
time_t GetResetTime() const
virtual void FillInitialWorldStates(WorldPacket &)
static void DeleteFromInventoryDB(CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid)
void SetState(ItemUpdateState state, Player *forplayer=nullptr)
virtual void SaveToDB(CharacterDatabaseTransaction trans)
uint32 GetEnchantmentId(EnchantmentSlot slot) const
uint32 GetPaidExtendedCost()
void SetPaidMoney(uint32 money)
ObjectGuid::LowType GetRefundRecipient()
int32 GetItemRandomPropertyId() const
ItemTemplate const * GetTemplate() const
void SaveRefundDataToDB()
void SetNotRefundable(Player *owner, bool changestate=true, CharacterDatabaseTransaction *trans=nullptr)
uint32 GetItemSuffixFactor() const
void SendTimeUpdate(Player *owner)
void SetRefundRecipient(ObjectGuid::LowType pGuidLow)
void UpdatePlayedTime(Player *owner)
void SetEnchantmentCharges(EnchantmentSlot slot, uint32 charges)
void ClearEnchantment(EnchantmentSlot slot)
void SetPaidExtendedCost(uint32 iece)
uint32 GetEnchantmentCharges(EnchantmentSlot slot) const
uint8 GetGemCountWithLimitCategory(uint32 limitCategory) const
bool IsFitToSpellRequirements(SpellInfo const *spellInfo) const
bool operator()(const SpellModifier *a, const SpellModifier *b) const
void SendMailTo(CharacterDatabaseTransaction trans, MailReceiver const &receiver, MailSender const &sender, MailCheckMask checked=MAIL_CHECK_MASK_NONE, uint32 deliver_delay=0, uint32 custom_expiration=0, bool deleteMailItemsFromDB=false, bool sendMail=true, int32 auctionId=0)
MailDraft & AddMoney(uint32 money)
void SendReturnToSender(uint32 sender_acc, ObjectGuid::LowType sender_guid, ObjectGuid::LowType receiver_guid, CharacterDatabaseTransaction trans)
MailDraft & AddItem(Item *item)
bool IsBattlegroundOrArena() const
virtual void RemovePlayerFromMap(Player *, bool)
bool IsNonRaidDungeon() const
void AddCorpse(Corpse *corpse)
Corpse * GetCorpseByPlayer(ObjectGuid const &ownerGuid) const
GameObject * GetGameObject(ObjectGuid const guid)
Creature * GetCreature(ObjectGuid const guid)
void UpdateIteratorBack(Player *player)
Difficulty GetDifficulty() const
Corpse * ConvertCorpseToBones(ObjectGuid const ownerGuid, bool insignia=false)
bool AddToMap(T *, bool checkTransport=false)
static bool IsValidMapCoord(uint32 mapid, Position const &pos)
void MovementExpired(bool reset=true)
void MoveFall(uint32 id=0, bool addFlagForNPC=false)
PackedGuid WriteAsPacked() const
LowType GetCounter() const
static ObjectGuid const Empty
bool IsMOTransport() const
std::string ToString() const
bool IsGameObject() const
void _Create(ObjectGuid::LowType guidlow, uint32 entry, HighGuid guidhigh)
void UpdateUInt32Value(uint16 index, uint32 value)
uint8 GetByteValue(uint16 index, uint8 offset) const
void SetByteValue(uint16 index, uint8 offset, uint8 value)
void SetInt32Value(uint16 index, int32 value)
uint32 GetUInt32Value(uint16 index) const
uint16 GetUInt16Value(uint16 index, uint8 offset) const
virtual void DestroyForPlayer(Player *target, bool onDeath=false) const
bool AddGuidValue(uint16 index, ObjectGuid value)
virtual void BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const
bool isType(uint16 mask) const
void SetFlag(uint16 index, uint32 newFlag)
void RemoveFlag(uint16 index, uint32 oldFlag)
void ApplyModUInt32Value(uint16 index, int32 val, bool apply)
float GetFloatValue(uint16 index) const
void ApplyModFlag(uint16 index, uint32 flag, bool apply)
void SetGuidValue(uint16 index, ObjectGuid value)
void SetFlag64(uint16 index, uint64 newFlag)
uint64 GetUInt64Value(uint16 index) const
void SetFloatValue(uint16 index, float value)
bool RemoveGuidValue(uint16 index, ObjectGuid value)
virtual void AddToWorld()
void RemoveByteFlag(uint16 index, uint8 offset, uint8 newFlag)
bool HasFlag(uint16 index, uint32 flag) const
virtual void RemoveFromWorld()
static ObjectGuid GetGUID(Object const *o)
PackedGuid const & GetPackGUID() const
bool HasByteFlag(uint16 index, uint8 offset, uint8 flag) const
void SetUInt32Value(uint16 index, uint32 value)
ObjectGuid GetGUID() const
void ToggleFlag(uint16 index, uint32 flag)
void SetUInt64Value(uint16 index, uint64 value)
ObjectGuid GetGuidValue(uint16 index) const
void ForceValuesUpdateAtIndex(uint32)
void SetByteFlag(uint16 index, uint8 offset, uint8 newFlag)
virtual void FillInitialWorldStates(WorldPacket &)
uint8 GetFreeTalentPoints()
void SavePetToDB(PetSaveMode mode, bool logout)
PetType getPetType() const
bool IsPermanentPetFor(Player *owner) const
static bool LoadPetFromDB(Player *owner, uint8 asynchLoadType, uint32 petentry=0, uint32 petnumber=0, bool current=false, AsynchPetSummon *info=nullptr)
bool isTemporarySummoned() const
int32 GetDuration() const
bool isControlled() const
void SetFreeTalentPoints(uint8 points)
bool HasSpell(uint32 spell) const override
void DeleteFromDB() override
bool learnSpell(uint32 spell_id)
void SaveToDB(bool create, bool logout)
bool StoreNewItemInBestSlots(uint32 item_id, uint32 item_count)
uint32 GetBarberShopCost(uint8 newhairstyle, uint8 newhaircolor, uint8 newfacialhair, BarberShopStyleEntry const *newSkin=nullptr)
void AddNewMailDeliverTime(time_t deliver_time)
bool IsAtRecruitAFriendDistance(WorldObject const *pOther) const
void UpdateParryPercentage()
bool HasPendingSpectatorForBG(uint32 bgInstanceId) const
bool RewardHonor(Unit *victim, uint32 groupsize, int32 honor=-1, bool awardXP=true)
void SendMirrorTimer(MirrorTimerType Type, uint32 MaxValue, uint32 CurrentValue, int32 Regen)
InstanceTimeMap _instanceResetTimes
std::string GetPlayerName()
void GetAurasForTarget(Unit *target)
ActionButton * addActionButton(uint8 button, uint32 action, uint8 type)
void UpdateAchievementCriteria(AchievementCriteriaTypes type, uint32 miscValue1=0, uint32 miscValue2=0, Unit *unit=nullptr)
bool SetDisableGravity(bool disable, bool packetOnly) override
void CheckAreaExploreAndOutdoor()
void KilledMonsterCredit(uint32 entry, ObjectGuid guid=ObjectGuid::Empty)
uint16 m_additionalSaveTimer
static uint32 GetUInt32ValueFromArray(Tokenizer const &data, uint16 index)
ReputationMgr & GetReputationMgr()
void SendInitialPacketsAfterAddToMap()
void ResetSeasonalQuestStatus(uint16 event_id)
static TeamId TeamIdForRace(uint8 race)
void ActivateSpec(uint8 spec)
void SendTeleportAckPacket()
void SendExplorationExperience(uint32 Area, uint32 Experience)
GroupReference m_originalGroup
static bool IsEquipmentPos(uint16 pos)
const PlayerTalentMap & GetTalentMap() const
static void RemoveFromGroup(Group *group, ObjectGuid guid, RemoveMethod method=GROUP_REMOVEMETHOD_DEFAULT, ObjectGuid kicker=ObjectGuid::Empty, const char *reason=nullptr)
float GetMeleeCritFromAgility()
Difficulty GetRaidDifficulty() const
void SetSpellModTakingSpell(Spell *spell, bool apply)
void _ApplyAllLevelScaleItemMods(bool apply)
bool _StoreOrEquipNewItem(uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot, int32 price, ItemTemplate const *pProto, Creature *pVendor, VendorItem const *crItem, bool bStore)
void AutoStoreLoot(uint8 bag, uint8 slot, uint32 loot_id, LootStore const &store, bool broadcast=false)
void RemoveAtLoginFlag(AtLoginFlags flags, bool persist=false)
void _removeTalent(PlayerTalentMap::iterator &itr, uint8 specMask)
void SendMailResult(uint32 mailId, MailResponseType mailAction, MailResponseResult mailError, uint32 equipError=0, ObjectGuid::LowType item_guid=0, uint32 item_count=0)
uint32 m_temporaryUnsummonedPetNumber
bool IsBaseRuneSlotsOnCooldown(RuneType runeType) const
void SendCinematicStart(uint32 CinematicSequenceId)
QuestStatusMap m_QuestStatus
uint32 m_ChampioningFaction
void RemoveRunesByAuraEffect(AuraEffect const *aura)
bool NeedSendSpectatorData() const
bool m_bHasDelayedTeleport
void ScheduleDelayedOperation(uint32 operation)
void removeActionButton(uint8 button)
bool _addSpell(uint32 spellId, uint8 addSpecMask, bool temporary, bool learnFromSkill=false)
static void OfflineResurrect(ObjectGuid const guid, CharacterDatabaseTransaction trans)
void StartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry, uint32 timeLost=0)
static uint32 GetLevelFromStorage(ObjectGuid::LowType guid)
void HandleFall(MovementInfo const &movementInfo)
int32 GetQuestLevel(Quest const *quest) const
void SendTalentsInfoData(bool pet)
void RemoveItemDependentAurasAndCasts(Item *pItem)
void SetOriginalGroup(Group *group, int8 subgroup=-1)
void SendProficiency(ItemClass itemClass, uint32 itemSubclassMask)
void removeSpell(uint32 spellId, uint8 removeSpecMask, bool onlyTemporary)
bool AddItem(uint32 itemId, uint32 count)
uint32 GetArenaPersonalRating(uint8 slot) const
bool IsInSameRaidWith(Player const *p) const
void RemoveSpellMods(Spell *spell)
ReputationMgr * m_reputationMgr
float m_auraBaseMod[BASEMOD_END][MOD_END]
void LearnTalent(uint32 talentId, uint32 talentRank)
void ToggleMetaGemsActive(uint8 exceptslot, bool apply)
InventoryResult CanEquipItem(uint8 slot, uint16 &dest, Item *pItem, bool swap, bool not_loading=true) const
void RewardExtraBonusTalentPoints(uint32 bonusTalentPoints)
void learnSpell(uint32 spellId, bool temporary=false, bool learnFromSkill=false)
bool HasQuestForGO(int32 GOId) const
void InitPrimaryProfessions()
static uint32 GetArenaTeamIdFromStorage(ObjectGuid::LowType guid, uint8 slot)
void InitTalentForLevel()
PlayerSpellMap const & GetSpellMap() const
bool HasItemFitToSpellRequirements(SpellInfo const *spellInfo, Item const *ignoreItem=nullptr) const
WorldSession * GetSession() const
void SendMessageToSetInRange_OwnTeam(WorldPacket *data, float dist, bool self)
void SendCorpseReclaimDelay(uint32 delay)
void SendRemoveControlBar()
static void DeleteOldCharacters()
void _LoadGlyphs(PreparedQueryResult result)
void SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint32 time, bool onEnterMap)
bool addTalent(uint32 spellId, uint8 addSpecMask, uint8 oldTalentRank)
uint32 GetGuildId() const
InventoryResult CanEquipNewItem(uint8 slot, uint16 &dest, uint32 item, bool swap) const
static uint32 GetZoneIdFromDB(ObjectGuid guid)
void SetRestFlag(RestFlag restFlag, uint32 triggerId=0)
void SummonIfPossible(bool agree, ObjectGuid summoner_guid)
void SetFarSightDistance(float radius)
void InitGlyphsForLevel()
ItemDurationList m_itemDuration
void _removeTalentAurasAndSpells(uint32 spellId)
void GiveLevel(uint8 level)
void BuildPetTalentsInfoData(WorldPacket *data)
void SendUpdateToOutOfRangeGroupMembers()
void UpdateShieldBlockValue()
uint32 GetFreeTalentPoints() const
bool IsInWhisperWhiteList(ObjectGuid guid)
void UpdateMaxPower(Powers power) override
void Regenerate(Powers power)
void SetGroupUpdateFlag(uint32 flag)
Bag * GetBagByPos(uint8 slot) const
void AddRefundReference(ObjectGuid itemGUID)
void SetServerSideVisibility(ServerSideVisibilityType type, AccountTypes sec)
uint32 EnvironmentalDamage(EnviromentalDamage type, uint32 damage)
void ApplyItemEquipSpell(Item *item, bool apply, bool form_change=false)
uint32 GetArenaPoints() const
void SetGameMaster(bool on)
void ApplyRatingMod(CombatRating cr, int32 value, bool apply)
bool m_MonthlyQuestChanged
void DuelComplete(DuelCompleteType type)
void UpdateVisibilityForPlayer(bool mapChange=false)
void UpdateCritPercentage(WeaponAttackType attType)
uint8 GetDrunkValue() const
FlyByCameraCollection * m_cinematicCamera
void SetRuneCooldown(uint8 index, uint32 cooldown)
SkillStatusMap mSkillStatus
float GetAverageItemLevelForDF()
void RestoreSpellMods(Spell *spell, uint32 ownerAuraId=0, Aura *aura=nullptr)
uint16 GetSkillValue(uint32 skill) const
WorldLocation _corpseLocation
void CastItemCombatSpell(Unit *target, WeaponAttackType attType, uint32 procVictim, uint32 procEx)
void SetInWater(bool apply)
void SetAcceptWhispers(bool on)
void DestroyForPlayer(Player *target, bool onDeath=false) const override
time_t m_lastHonorUpdateTime
InventoryResult CanEquipUniqueItem(Item *pItem, uint8 except_slot=NULL_SLOT, uint32 limit_count=1) const
void ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) override
void UpdateSkillsToMaxSkillsForLevel()
void SendBGWeekendWorldStates()
void _SaveTalents(CharacterDatabaseTransaction trans)
bool addSpell(uint32 spellId, uint8 addSpecMask, bool updateActive, bool temporary=false, bool learnFromSkill=false)
void SendTalentWipeConfirm(ObjectGuid guid)
void BuildEnchantmentsInfoData(WorldPacket *data)
void SetCanParry(bool value)
uint8 m_forced_speed_changes[MAX_MOVE_TYPE]
float GetRatingBonusValue(CombatRating cr) const
void SendDirectMessage(WorldPacket *data)
InventoryResult CanStoreItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, Item *pItem, bool swap=false) const
void CharmSpellInitialize()
void SetCanTitanGrip(bool value)
void SaveInventoryAndGoldToDB(CharacterDatabaseTransaction trans)
void LearnDefaultSkill(uint32 skillId, uint16 rank)
uint32 m_resetTalentsCost
void SetArenaPoints(uint32 value)
bool HasItemCount(uint32 item, uint32 count=1, bool inBankAlso=false) const
void SetArenaTeamInfoField(uint8 slot, ArenaTeamInfoType type, uint32 value)
void SendLootRelease(ObjectGuid guid)
bool canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const *bySpell) const
void GetDodgeFromAgility(float &diminishing, float &nondiminishing)
void SetGroup(Group *group, int8 subgroup=-1)
void CleanupsBeforeDelete(bool finalCleanup=true) override
void SetRestBonus(float rest_bonus_new)
float GetTotalBaseModValue(BaseModGroup modGroup) const
bool isBeingLoaded() const override
static uint32 GetGuildIdFromStorage(ObjectGuid::LowType guid)
DFQuestsDoneList m_DFQuests
void SetActiveSpec(uint8 spec)
void DurabilityLossAll(double percent, bool inventory)
void UpdateBlockPercentage()
bool CanUseBattlegroundObject(GameObject *gameobject) const
void GetTalentTreePoints(uint8(&specPoints)[3]) const
bool m_WeeklyQuestChanged
Group * GetOriginalGroup()
uint32 GetTotalPlayedTime()
bool ModifyMoney(int32 amount, bool sendError=true)
bool InBattleground() const
void SendLearnPacket(uint32 spellId, bool learn)
void ApplySpellPenetrationBonus(int32 amount, bool apply)
uint32 GetXPRestBonus(uint32 xp)
void DurabilityPointLossForEquipSlot(EquipmentSlots slot)
void GiveXP(uint32 xp, Unit *victim, float group_rate=1.0f)
uint32 GetRuneBaseCooldown(uint8 index, bool skipGrace)
TeamId GetTeamId(bool original=false) const
void CompletedAchievement(AchievementEntry const *entry)
bool inRandomLfgDungeon()
void SetRegularAttackTime()
uint32 m_pendingSpectatorInviteInstanceId
void SetBaseRune(uint8 index, RuneType baseRune)
void SetGroupInvite(Group *group)
uint32 m_DelayedOperations
void _LoadTalents(PreparedQueryResult result)
uint32 GetGlyph(uint8 slot) const
void SpawnCorpseBones(bool triggerSave=true)
void UpdateZone(uint32 newZone, uint32 newArea)
void SetDrunkValue(uint8 newDrunkValue, uint32 itemId=0)
void SetMonthlyQuestStatus(uint32 quest_id)
void RemoveMail(uint32 id)
bool HasItemOrGemWithIdEquipped(uint32 item, uint32 count, uint8 except_slot=NULL_SLOT) const
bool IsSpellFitByClassAndRace(uint32 spell_id) const
float GetReputationPriceDiscount(Creature const *creature) const
bool SetCanFly(bool apply, bool packetOnly=false) override
EquipmentSets m_EquipmentSets
bool IsInAreaTriggerRadius(const AreaTrigger *trigger) const
Difficulty GetDifficulty(bool isRaid) const
void RemoveFromBattlegroundOrBattlefieldRaid()
bool IsPetNeedBeTemporaryUnsummoned() const
void LoadActions(PreparedQueryResult result)
void PetSpellInitialize()
QuestGiverStatus GetQuestDialogStatus(Object *questGiver)
void SetSeasonalQuestStatus(uint32 quest_id)
Item * GetUseableItemByPos(uint8 bag, uint8 slot) const
void DropModCharge(SpellModifier *mod, Spell *spell)
void UpdateEquipSpellsAtFormChange()
GuidUnorderedSet m_clientGUIDs
void ContinueTaxiFlight()
void _SaveCharacter(bool create, CharacterDatabaseTransaction trans)
void SetFallInformation(uint32 time, float z)
void SendInitialPacketsBeforeAddToMap()
static void DeleteFromDB(ObjectGuid::LowType lowGuid, uint32 accountId, bool updateRealmChars, bool deleteFinally)
void ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool apply_dur=true, bool ignore_condition=false)
void UpdateVisibilityOf(WorldObject *target)
Item * EquipNewItem(uint16 pos, uint32 item, bool update)
void SetLootGUID(ObjectGuid guid)
bool HasPendingBind() const
void ResurectUsingRequestData()
SpellModList m_spellMods[MAX_SPELLMOD]
bool ActivateTaxiPathTo(std::vector< uint32 > const &nodes, Creature *npc=nullptr, uint32 spellid=1)
bool HasActiveSpell(uint32 spell) const
void ResetMonthlyQuestStatus()
uint16 GetMaxSkillValueForLevel() const
void ResetDailyQuestStatus()
time_t mSemaphoreTeleport_Far
GameObject * GetGameObjectIfCanInteractWith(ObjectGuid guid, GameobjectTypes type) const
bool SetHover(bool enable, bool packetOnly=false) override
uint32 m_foodEmoteTimerCount
bool IsNeedCastPassiveSpellAtLearn(SpellInfo const *spellInfo) const
void SetGlyphSlot(uint8 slot, uint32 slottype)
void SetObjectScale(float scale) override
Battleground * GetBattleground(bool create=false) const
void UpdateLootAchievements(LootItem *item, Loot *loot)
void DeleteRefundReference(ObjectGuid itemGUID)
Position m_remoteSightPosition
void ResyncRunes(uint8 count)
bool IsAtGroupRewardDistance(WorldObject const *pRewardSource) const
bool CanTitanGrip() const
bool TeleportToEntryPoint()
void SetCurrentTitle(CharTitlesEntry const *title, bool clear=false)
void _RemoveAllItemMods()
bool BuyItemFromVendorSlot(ObjectGuid vendorguid, uint32 vendorslot, uint32 item, uint8 count, uint8 bag, uint8 slot)
bool HasItemOrGemWithLimitCategoryEquipped(uint32 limitCategory, uint32 count, uint8 except_slot=NULL_SLOT) const
void SetRestState(uint32 triggerId)
uint32 GetResurrectionSpellId()
bool HasTitle(uint32 bitIndex) const
void SendUpdateWorldState(uint32 Field, uint32 Value)
void _ApplyItemBonuses(ItemTemplate const *proto, uint8 slot, bool apply, bool only_level_scale=false)
uint32 m_charmAISpells[NUM_CAI_SPELLS]
uint8 m_additionalSaveMask
void _LoadBrewOfTheMonth(PreparedQueryResult result)
bool m_bMustDelayTeleport
bool m_SeasonalQuestChanged
uint32 GetLastPetSpell() const
uint16 GetPureSkillValue(uint32 skill) const
bool Create(ObjectGuid::LowType guidlow, CharacterCreateInfo *createInfo)
void SendDuelCountdown(uint32 counter)
bool IsTwoHandUsed() const
void _ApplyWeaponDependentAuraDamageMod(Item *item, WeaponAttackType attackType, AuraEffect const *aura, bool apply)
bool HasAchieved(uint32 achievementId) const
bool HasTalent(uint32 spell_id, uint8 spec) const
void SetCanBlock(bool value)
bool GetCommandStatus(uint32 command) const
int16 GetSkillTempBonusValue(uint32 skill) const
bool CheckAmmoCompatibility(const ItemTemplate *ammo_proto) const
uint32 m_extraBonusTalentCount
MapReference & GetMapRef()
void RestoreBaseRune(uint8 index)
int16 GetSkillPermBonusValue(uint32 skill) const
Item * StoreItem(ItemPosCountVec const &pos, Item *pItem, bool update)
void DeleteEquipmentSet(uint64 setGuid)
OutdoorPvP * GetOutdoorPvP() const
bool HasSpellCooldown(uint32 spell_id) const override
void SetBattlegroundId(uint32 id, BattlegroundTypeId bgTypeId, uint32 queueSlot, bool invited, bool isRandom, TeamId teamId)
void RemoveRestFlag(RestFlag restFlag)
void _ApplyWeaponDamage(uint8 slot, ItemTemplate const *proto, ScalingStatValuesEntry const *ssv, bool apply)
void SetServerSideVisibilityDetect(ServerSideVisibilityType type, AccountTypes sec)
void SetGracePeriod(uint8 index, uint32 period)
Item * GetItemByPos(uint16 pos) const
bool HasSkill(uint32 skill) const
void _ApplyAllStatBonuses()
InventoryResult CanUseAmmo(uint32 item) const
bool IsNeverVisible() const override
void SetViewpoint(WorldObject *target, bool apply)
JoinedChannelsList m_channels
bool EnchantmentFitsRequirements(uint32 enchantmentcondition, int8 slot)
void UnsummonPetTemporaryIfAny()
void _LoadRandomBGStatus(PreparedQueryResult result)
float m_powerFraction[MAX_POWERS]
void CheckDuelDistance(time_t currTime)
uint32 m_currentBuybackSlot
bool isTotalImmune() const
bool GetsRecruitAFriendBonus(bool forXP)
ObjectGuid GetLootGUID() const
void SaveRecallPosition()
void ResetFarSightDistance()
BattlegroundQueueTypeId m_bgBattlegroundQueueID[PLAYER_MAX_BATTLEGROUND_QUEUES]
void SetAmmo(uint32 item)
float GetBaseModValue(BaseModGroup modGroup, BaseModType modType) const
void BuildCreateUpdateBlockForPlayer(UpdateData *data, Player *target) const override
uint16 GetMaxSkillValue(uint32 skill) const
bool HasEnoughMoney(uint32 amount) const
float GetSightRange(const WorldObject *target=nullptr) const override
uint32 GetQuestSlotQuestId(uint16 slot) const
static uint32 GetArenaTeamIdFromDB(ObjectGuid guid, uint8 slot)
AchievementMgr * m_achievementMgr
void _ApplyWeaponDependentAuraCritMod(Item *item, WeaponAttackType attackType, AuraEffect const *aura, bool apply)
bool CanAlwaysSee(WorldObject const *obj) const override
void DestroyItem(uint8 bag, uint8 slot, bool update)
uint16 GetBaseSkillValue(uint32 skill) const
time_t m_nextMailDelivereTime
uint16 GetSkillStep(uint16 skill) const
std::string const & GetGuildName()
void MoveItemFromInventory(uint8 bag, uint8 slot, bool update)
void RewardPlayerAndGroupAtKill(Unit *victim, bool isBattleGround)
void SetSelection(ObjectGuid guid)
Used for serverside target changes, does not apply to players.
uint32 GetHonorPoints() const
void AddSpellAndCategoryCooldowns(SpellInfo const *spellInfo, uint32 itemId, Spell *spell=nullptr, bool infinityCooldown=false)
void SendRespondInspectAchievements(Player *player) const
void clearResurrectRequestData()
static bool IsInventoryPos(uint16 pos)
bool CanNoReagentCast(SpellInfo const *spellInfo) const
void SendBattlefieldWorldStates()
void SummonPet(uint32 entry, float x, float y, float z, float ang, PetType petType, uint32 despwtime, uint32 createdBySpell, ObjectGuid casterGUID, uint8 asynchLoadType)
void LearnPetTalent(ObjectGuid petGuid, uint32 talentId, uint32 talentRank)
uint16 GetPureMaxSkillValue(uint32 skill) const
void InitDataForForm(bool reapplyMods=false)
uint32 m_pendingSpectatorForBG
uint32 DurabilityRepairAll(bool cost, float discountMod, bool guildBank)
void SetSkill(uint16 id, uint16 step, uint16 currVal, uint16 maxVal)
uint32 m_Glyphs[MAX_TALENT_SPECS][MAX_GLYPH_SLOT_INDEX]
static uint32 GetGroupIdFromStorage(ObjectGuid::LowType guid)
void _SaveEquipmentSets(CharacterDatabaseTransaction trans)
Difficulty m_dungeonDifficulty
uint32 m_weaponChangeTimer
WorldObject * GetViewpoint() const
void AddComboPoints(Unit *target, int8 count)
uint32 m_WeaponProficiency
void SetCurrentRune(uint8 index, RuneType currentRune)
void UpdateCorpseReclaimDelay()
void RemovePet(Pet *pet, PetSaveMode mode, bool returnreagent=false)
void learnSpellHighRank(uint32 spellid)
uint32 GetBaseWeaponSkillValue(WeaponAttackType attType) const
int32 CalculateReputationGain(ReputationSource source, uint32 creatureOrQuestLevel, int32 rep, int32 faction, bool noQuestBonus=false)
uint32 GetRuneCooldown(uint8 index) const
void SendLoot(ObjectGuid guid, LootType loot_type)
void learnSkillRewardedSpells(uint32 id, uint32 value)
void _ApplyItemMods(Item *item, uint8 slot, bool apply)
uint32 GetArenaTeamId(uint8 slot) const
float GetRatingMultiplier(CombatRating cr) const
WorldLocation GetCorpseLocation() const
void RemoveCategoryCooldown(uint32 cat)
WorldLocation teleportStore_dest
PartyResult CanUninviteFromGroup(ObjectGuid targetPlayerGUID=ObjectGuid::Empty) const
void _SaveGlyphs(CharacterDatabaseTransaction trans)
void SetHonorPoints(uint32 value)
void ApplyManaRegenBonus(int32 amount, bool apply)
time_t mSemaphoreTeleport_Near
DeclinedName * m_declinedname
void InitTaxiNodesForLevel()
ActionButton const * GetActionButton(uint8 button)
void _LoadSkills(PreparedQueryResult result)
bool CanJoinToBattleground() const
void AddSpellCooldown(uint32 spell_id, uint32 itemid, uint32 end_time, bool needSendToClient=false, bool forceSendToSpectator=false) override
void SetDailyQuestStatus(uint32 quest_id)
Corpse * GetCorpse() const
int16 m_baseRatingValue[MAX_COMBAT_RATING]
bool IsAtLootRewardDistance(WorldObject const *pRewardSource) const
void RemoveItem(uint8 bag, uint8 slot, bool update, bool swap=false)
void RestoreAllSpellMods(uint32 ownerAuraId=0, Aura *aura=nullptr)
void DurabilityLoss(Item *item, double percent)
bool Has310Flyer(bool checkAllSpells, uint32 excludeSpellId=0)
WorldLocation & GetTeleportDest()
RewardedQuestSet m_RewardedQuests
void InitStatsForLevel(bool reapplyMods=false)
void SendInitWorldStates(uint32 zone, uint32 area)
void HandleSobering()
The player sobers by 1% every 9 seconds.
uint32 m_contestedPvPTimer
void ProcessDelayedOperations()
float GetAverageItemLevel()
void SetMountBlockId(uint32 mount)
float GetExpertiseDodgeOrParryReduction(WeaponAttackType attType) const
bool SetWaterWalking(bool apply, bool packetOnly=false) override
void SendSavedInstances()
uint32 m_lastCinematicCheck
int32 CalculateCorpseReclaimDelay(bool load=false)
Creature * GetNPCIfCanInteractWith(ObjectGuid guid, uint32 npcflagmask)
void SendLootError(ObjectGuid guid, LootError error)
void ResetWeeklyQuestStatus()
void SetSemaphoreTeleportNear(time_t tm)
void SendRefundInfo(Item *item)
void SendNewItem(Item *item, uint32 count, bool received, bool created, bool broadcast=false, bool sendChatMessage=true)
void AutoUnequipOffhandIfNeed(bool force=false)
bool IsGroupVisibleFor(Player const *p) const
float OCTRegenHPPerSpirit()
void UpdateObjectVisibility(bool forced=true, bool fromUpdate=false) override
bool resetTalents(bool noResetCost=false)
uint32 m_Played_time[MAX_PLAYED_TIME_INDEX]
RuneType GetCurrentRune(uint8 index) const
void UpdateMaxHealth() override
void SetLastPetSpell(uint32 petspell)
bool IsGameMaster() const
void SendMovieStart(uint32 MovieId)
void SetActiveCinematicCamera(uint32 cinematicCameraId=0)
void SetPendingBind(uint32 instanceId, uint32 bindTimer)
void _SaveAuras(CharacterDatabaseTransaction trans, bool logout)
Item * EquipItem(uint16 pos, Item *pItem, bool update)
PlayerSocial * GetSocial()
void SetPvPDeath(bool on)
uint32 GetSpec(int8 spec=-1)
bool TeleportTo(uint32 mapid, float x, float y, float z, float orientation, uint32 options=0, Unit *target=nullptr, bool newInstance=false)
Optional< float > GetFarSightDistance() const
void SetEquipmentSet(uint32 index, EquipmentSet eqset)
void SetNeedToSaveGlyphs(bool val)
void SendClearCooldown(uint32 spell_id, Unit *target)
void SendMessageToSetInRange(WorldPacket *data, float dist, bool self, bool includeMargin=false, Player const *skipped_rcvr=nullptr) override
void _ApplyWeaponDependentAuraMods(Item *item, WeaponAttackType attackType, bool apply)
void ModifySkillBonus(uint32 skillid, int32 val, bool talent)
TrainerSpellState GetTrainerSpellState(TrainerSpell const *trainer_spell) const
Item * m_items[PLAYER_SLOTS_COUNT]
void ResetAchievementCriteria(AchievementCriteriaCondition condition, uint32 value, bool evenIfCriteriaComplete=false)
Difficulty m_raidMapDifficulty
void DurabilityPointsLossAll(int32 points, bool inventory)
float GetSpellCritFromIntellect()
bool IsVisibleGloballyFor(Player const *player) const
static uint8 GetAttackBySlot(uint8 slot)
void AddItemDurations(Item *item)
uint8 m_MirrorTimerFlagsLast
std::vector< ItemSetEffect * > ItemSetEff
uint32 GetCorpseReclaimDelay(bool pvp) const
void SetFreeTalentPoints(uint32 points)
void SetTitle(CharTitlesEntry const *title, bool lost=false)
Creature * m_CinematicObject
time_t m_lastDailyQuestTime
void SetWeeklyQuestStatus(uint32 quest_id)
void SendNotifyLootItemRemoved(uint8 lootSlot)
uint32 DurabilityRepair(uint16 pos, bool cost, float discountMod, bool guildBank)
uint8 GetActiveSpec() const
time_t m_resetTalentsTime
uint32 m_charmUpdateTimer
static void RemovePetitionsAndSigns(ObjectGuid guid, uint32 type)
void StoreLootItem(uint8 lootSlot, Loot *loot)
void UpdateSkillEnchantments(uint16 skill_id, uint16 curr_value, uint16 new_value)
uint32 GetReputation(uint32 factionentry) const
void ApplyEquipCooldown(Item *pItem)
Difficulty m_raidDifficulty
void PossessSpellInitialize()
void DestroyItemCount(uint32 item, uint32 count, bool update, bool unequip_check=false)
void ModifyHonorPoints(int32 value, CharacterDatabaseTransaction trans=CharacterDatabaseTransaction(nullptr))
WhisperListContainer WhisperList
void SetGMVisible(bool on)
void _SaveActions(CharacterDatabaseTransaction trans)
bool m_summon_asSpectator
bool CanResummonPet(uint32 spellid)
Difficulty GetStoredRaidDifficulty() const
void SetReputation(uint32 factionentry, uint32 value)
void ApplySpellPowerBonus(int32 amount, bool apply)
int32 m_MirrorTimer[MAX_TIMERS]
void SetBindPoint(ObjectGuid guid)
void RemoveItemDurations(Item *item)
void PrepareCharmAISpells()
QuestStatus GetQuestStatus(uint32 quest_id) const
void ConvertRune(uint8 index, RuneType newType)
static bool BuildEnumData(PreparedQueryResult result, WorldPacket *data)
void _SaveInstanceTimeRestrictions(CharacterDatabaseTransaction trans)
void SendEnchantmentDurations()
void _LoadActions(PreparedQueryResult result)
static std::unordered_map< int, bgZoneRef > bgZoneIdToFillWorldStates
T ApplySpellMod(uint32 spellId, SpellModOp op, T &basevalue, Spell *spell=nullptr, bool temporaryPet=false)
bool IsDailyQuestDone(uint32 quest_id)
uint32 m_ArenaTeamIdInvited
uint8 GetActiveSpecMask() const
void StopCastingBindSight()
uint32 GetBattlegroundId() const
static bool IsValidGender(uint8 Gender)
void SendMessageToSet(WorldPacket *data, bool self) override
void ModifyArenaPoints(int32 value, CharacterDatabaseTransaction trans=CharacterDatabaseTransaction(nullptr))
If trans is specified, honor save query will be added to trans.
bool IsAlwaysDetectableFor(WorldObject const *seer) const override
uint32 GetSpellCooldownDelay(uint32 spell_id) const
bool UpdateAllStats() override
void SendLogXPGain(uint32 GivenXP, Unit *victim, uint32 BonusXP, bool recruitAFriend=false, float group_rate=1.0f)
void LeaveBattleground(Battleground *bg=nullptr)
void SetClientControl(Unit *target, bool allowMove, bool packetOnly=false)
void UpdateRating(CombatRating cr)
void ApplyEquipSpell(SpellInfo const *spellInfo, Item *item, bool apply, bool form_change=false)
ReputationRank GetReputationRank(uint32 faction_id) const
void TradeCancel(bool sendback)
void UpdateArea(uint32 newArea)
Player * GetSelectedPlayer() const
void SetHasDelayedTeleport(bool setting)
void SendBuyError(BuyResult msg, Creature *creature, uint32 item, uint32 param)
void ModifySpellCooldown(uint32 spellId, int32 cooldown)
Unit * GetSelectedUnit() const
void setDeathState(DeathState s, bool despawn=false) override
static Item * _LoadMailedItem(ObjectGuid const &playerGuid, Player *player, uint32 mailId, Mail *mail, Field *fields)
Item * GetWeaponForAttack(WeaponAttackType attackType, bool useable=false) const
uint32 m_questRewardTalentCount
Player * GetNextRandomRaidMember(float radius)
void AddToWorld() override
Item * StoreNewItem(ItemPosCountVec const &pos, uint32 item, bool update, int32 randomPropertyId=0)
void RemoveAllSpellCooldown()
bool HasAtLoginFlag(AtLoginFlags f) const
void SetHas310Flyer(bool on)
uint8 GetSpecsCount() const
void RewardReputation(Unit *victim, float rate)
void RemoveTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry)
void SetMovement(PlayerMovementType pType)
void SetIsSpectator(bool on)
bool isHonorOrXPTarget(Unit *victim) const
static void LeaveAllArenaTeams(ObjectGuid guid)
RefundableItemsSet m_refundableItems
void HandleDrowning(uint32 time_diff)
uint32 GetPhaseMaskForSpawn() const
uint64 m_auraRaidUpdateMask
bool HasSpell(uint32 spell) const override
void UpdateSkillsForLevel()
void SetSemaphoreTeleportFar(time_t tm)
uint8 GetMostPointsTalentTree() const
ActionButtonList m_actionButtons
int32 getMaxTimer(MirrorTimerType timer)
bool HasSpellMod(SpellModifier *mod, Spell *spell)
uint8 GetSubGroup() const
void _RemoveAllStatBonuses()
void _SaveSpellCooldowns(CharacterDatabaseTransaction trans, bool logout)
void VehicleSpellInitialize()
bool MustDelayTeleport() const
void RemoveSpellCooldown(uint32 spell_id, bool update=false)
Player(WorldSession *session)
int32 m_spellPenetrationItemMod
bool SetFeatherFall(bool apply, bool packetOnly=false) override
void SetFreePrimaryProfessions(uint16 profs)
void SendInitialActionButtons() const
void SetMap(Map *map) override
bool isAcceptWhispers() const
void Yell(std::string_view text, Language language, WorldObject const *=nullptr) override
Handles yelled message in regular chat based on declared language and in config pre-defined Range.
bool CanReportAfkDueToLimit()
void CastItemUseSpell(Item *item, SpellCastTargets const &targets, uint8 cast_count, uint32 glyphIndex)
void SendTransferAborted(uint32 mapid, TransferAbortReason reason, uint8 arg=0)
void DurabilityPointsLoss(Item *item, int32 points)
void Say(std::string_view text, Language language, WorldObject const *=nullptr) override
Handles said message in regular chat based on declared language and in config pre-defined Range.
uint32 GetMaxPersonalArenaRatingRequirement(uint32 minarenaslot) const
If trans is specified, arena point save query will be added to trans.
void TextEmote(std::string_view text, WorldObject const *=nullptr, bool=false) override
Outputs an universal text which is supposed to be an action.
uint32 GetChampioningFaction() const
void LeftChannel(Channel *c)
void SetRuneConvertAura(uint8 index, AuraEffect const *aura)
void ReportedAfkBy(Player *reporter)
This player has been blamed to be inactive in a battleground.
uint32 GetShieldBlockValue() const override
void ApplyFeralAPBonus(int32 amount, bool apply)
uint32 m_flightSpellActivated
Optional< float > _farSightDistance
bool IsAffectedBySpellmod(SpellInfo const *spellInfo, SpellModifier *mod, Spell *spell=nullptr)
void RefundItem(Item *item)
float GetRestBonus() const
void Whisper(std::string_view text, Language language, Player *receiver, bool=false) override
Handles whispers from Addons and players based on sender, receiver's guid and language.
uint32 teleportStore_options
void AddSpellMod(SpellModifier *mod, bool apply)
void SetFactionForRace(uint8 race)
void SendEquipError(InventoryResult msg, Item *pItem, Item *pItem2=nullptr, uint32 itemid=0)
void SendActionButtons(uint32 state) const
Item * GetItemByGuid(ObjectGuid guid) const
uint32 m_ArmorProficiency
void _LoadInstanceTimeRestrictions(PreparedQueryResult result)
void ResummonPetTemporaryUnSummonedIfAny()
ObjectGuid GetComboTarget() const
void ApplyHealthRegenBonus(int32 amount, bool apply)
void AddRunePower(uint8 index)
void StoreRaidMapDifficulty()
uint32 CalculateTalentsPoints() const
void learnQuestRewardedSpells()
void RemovedInsignia(Player *looterPlr)
void RemoveFromWorld() override
void JoinedChannel(Channel *c)
bool CanSeeSpellClickOn(Creature const *creature) const
WorldLocation GetStartPosition() const
uint32 GetFreePrimaryProfessionPoints() const
Difficulty GetDungeonDifficulty() const
SpellCooldowns m_spellCooldowns
void CleanupAfterTaxiFlight()
SeasonalEventQuestMap m_seasonalquests
void SetGlyph(uint8 slot, uint32 glyph, bool save)
void SendEquipmentSetList()
void SendQuestGiverStatusMultiple()
bool IsOutdoorPvPActive()
void _AddSpellCooldown(uint32 spell_id, uint16 categoryId, uint32 itemid, uint32 end_time, bool needSendToClient=false, bool forceSendToSpectator=false)
bool CanInteractWithQuestGiver(Object *questGiver)
void _addTalentAurasAndSpells(uint32 spellId)
void SetMover(Unit *target)
void StopMirrorTimer(MirrorTimerType Type)
bool IsImmuneToEnvironmentalDamage()
uint32 GetGracePeriod(uint8 index) const
float OCTRegenMPPerSpirit()
Spell * m_spellModTakingSpell
void CorrectMetaGemEnchants(uint8 slot, bool apply)
uint32 resetTalentsCost() const
Mail * GetMail(uint32 id)
void CheckAllAchievementCriteria()
void AddKnownCurrency(uint32 itemId)
InventoryResult CanStoreNewItem(uint8 bag, uint8 slot, ItemPosCountVec &dest, uint32 item, uint32 count, uint32 *no_space_count=nullptr) const
void _LoadSpellCooldowns(PreparedQueryResult result)
RuneType GetBaseRune(uint8 index) const
void _SaveEntryPoint(CharacterDatabaseTransaction trans)
void SendCooldownEvent(SpellInfo const *spellInfo, uint32 itemId=0, Spell *spell=nullptr, bool setCooldown=true)
void UpdateAttackPowerAndDamage(bool ranged=false) override
bool CanJoinConstantChannelInZone(ChatChannelsEntry const *channel, AreaTableEntry const *zone)
bool IsInSameGroupWith(Player const *p) const
void SendRaidDifficulty(bool IsInGroup, int32 forcedDifficulty=-1)
void SetBattlegroundOrBattlefieldRaid(Group *group, int8 subgroup=-1)
static DrunkenState GetDrunkenstateByValue(uint8 value)
bool IsBeingTeleported() const
uint8 GetOriginalSubGroup() const
void SetMoney(uint32 value)
bool IsActionButtonDataValid(uint8 button, uint32 action, uint8 type)
void HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, float amount, bool apply)
PlayerTalentMap m_talents
bool CanCaptureTowerPoint() const
PlayerMenu * PlayerTalkClass
void SendNotifyLootMoneyRemoved()
std::set< Unit * > m_isInSharedVisionOf
bool GetBGAccessByLevel(BattlegroundTypeId bgTypeId) const
void SetRandomWinner(bool isWinner)
void BuildPlayerTalentsInfoData(WorldPacket *data)
void RewardPlayerAndGroupAtEvent(uint32 creature_id, WorldObject *pRewardSource)
TeamId GetBgTeamId() const
uint16 m_hostileReferenceCheckTimer
bool m_itemUpdateQueueBlocked
EntryPointData m_entryPointData
void RemoveArenaSpellCooldowns(bool removeActivePetCooldowns=false)
void LearnDefaultSkills()
void ResurrectPlayer(float restore_percent, bool applySickness=false)
uint32 m_activeCinematicCameraId
void SendSocialList(Player *player, uint32 flags)
std::string SaveTaxiDestinationsToString()
void AddTaxiDestination(uint32 dest)
uint32 GetTaxiSource() const
uint32 GetTaxiSegment() const
void ClearTaxiDestinations()
void SetTaxiSegment(uint32 segment)
uint32 GetCurrentTaxiPath() const
std::vector< uint32 > const & GetPath() const
void setInt32(const uint8 index, const int32 value)
void setFloat(const uint8 index, const float value)
void setUInt8(const uint8 index, const uint8 value)
void setUInt32(const uint8 index, const uint32 value)
void setUInt16(const uint8 index, const uint16 value)
void setString(const uint8 index, const std::string &value)
void setUInt64(const uint8 index, const uint64 value)
uint16 GetEventIdForQuest() const
int32 RequiredNpcOrGo[QUEST_OBJECTIVES_COUNT]
uint32 RequiredNpcOrGoCount[QUEST_OBJECTIVES_COUNT]
int32 RewardFactionValueIdOverride[QUEST_REPUTATIONS_COUNT]
bool IsRepeatable() const
bool IsAllowedInRaid(Difficulty difficulty) const
uint32 RewardFactionId[QUEST_REPUTATIONS_COUNT]
int32 RewardFactionValueId[QUEST_REPUTATIONS_COUNT]
int32 GetRewSpellCast() const
void link(TO *toObj, FROM *fromObj)
bool ModifyReputation(FactionEntry const *factionEntry, int32 standing, bool spillOverOnly=false)
int32 GetReputation(uint32 faction_id) const
bool SetReputation(FactionEntry const *factionEntry, int32 standing)
ReputationRank GetRank(FactionEntry const *factionEntry) const
void SendInitialReputations()
void SendForceReactions()
void Initialize(Unit *defVal)
static uint32 IncreaseSavingMaxValue(uint32 inc)
SpellCastResult prepare(SpellCastTargets const *targets, AuraEffect const *triggeredByAura=nullptr)
void SetSpellValue(SpellValueMod mod, int32 value)
SpellInfo const * m_spellInfo
SpellCastResult CheckCast(bool strict)
void InitExplicitTargets(SpellCastTargets const &targets)
static void SendCastResult(Player *caster, SpellInfo const *spellInfo, uint8 castCount, SpellCastResult result, SpellCustomErrors customError=SPELL_CUSTOM_ERROR_NONE)
UsedSpellMods m_appliedMods
std::array< int32, MAX_SPELL_REAGENTS > Reagent
uint32 GetCategory() const
SpellCastResult CheckShapeshift(uint32 form) const
bool IsCooldownStartedOnEvent() const
bool IsHighRankOf(SpellInfo const *spellInfo) const
bool IsAffectedBySpellMod(SpellModifier const *mod) const
bool IsStackableWithRanks() const
uint32 CategoryRecoveryTime
SpellSchoolMask GetSchoolMask() const
std::array< uint32, MAX_SPELL_REAGENTS > ReagentCount
bool NeedsComboPoints() const
bool HasAttribute(SpellAttr0 attribute) const
std::array< SpellEffectInfo, MAX_SPELL_EFFECTS > Effects
int32 GetDuration() const
SpellInfo const * GetNextRankSpell() const
bool IsPrimaryProfessionFirstRank() const
uint32 CalcCastTime(Unit *caster=nullptr, Spell *spell=nullptr) const
bool HasEffect(SpellEffects effect) const
bool IsAutoRepeatRangedSpell() const
static bool CheckSpellValid(SpellInfo const *spellInfo, uint32 spellId, bool isTalent)
bool operator()(const SpellModifier *a, const SpellModifier *b) const
virtual void RemovePassenger(WorldObject *passenger, bool withAll=false)=0
int32 ModifyHealth(int32 val)
void ClearUnitState(uint32 f)
void SetMinion(Minion *minion, bool apply)
bool IsUnderLastManaUseEffect() const
void RemoveOwnedAura(AuraMap::iterator &i, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
void InterruptSpell(CurrentSpellTypes spellType, bool withDelayed=true, bool withInstant=true, bool bySelf=false)
uint32 GetCreatePowers(Powers power) const
void RemoveGameObject(GameObject *gameObj, bool del)
Spell * m_currentSpells[CURRENT_MAX_SPELL]
void SetCreateStat(Stats stat, float val)
virtual void setDeathState(DeathState s, bool despawn=false)
void SetStat(Stats stat, int32 val)
void SetResistanceBuffMods(SpellSchools school, bool positive, float val)
uint32 GetUnitMovementFlags() const
LiquidTypeEntry const * _lastLiquid
void RemovePetAura(PetAura const *petSpell)
Aura * GetAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
void SetFacingTo(float ori)
static uint32 DealDamage(Unit *attacker, Unit *victim, uint32 damage, CleanDamage const *cleanDamage=nullptr, DamageEffectType damagetype=DIRECT_DAMAGE, SpellSchoolMask damageSchoolMask=SPELL_SCHOOL_MASK_NORMAL, SpellInfo const *spellProto=nullptr, bool durabilityLoss=true, bool allowGM=false)
void CombatStop(bool includingCast=false)
ReputationRank GetReactionTo(Unit const *target) const
void RemoveAura(AuraApplicationMap::iterator &i, AuraRemoveMode mode=AURA_REMOVE_BY_DEFAULT)
void AddToWorld() override
void SetFaction(uint32 faction)
FactionTemplateEntry const * GetFactionTemplateEntry() const
virtual void SetCanDualWield(bool value)
VisibleAuraMap const * GetVisibleAuras()
void SetControlled(bool apply, UnitState state)
void AddComboPointHolder(ObjectGuid lowguid)
bool CanUseAttackType(uint8 attacktype) const
float m_auraModifiersGroup[UNIT_MOD_END][MODIFIER_TYPE_END]
void SetCreateHealth(uint32 val)
std::list< Aura * > AuraList
void InterruptNonMeleeSpells(bool withDelayed, uint32 spellid=0, bool withInstant=true, bool bySelf=false)
void RemoveAurasWithInterruptFlags(uint32 flag, uint32 except=0)
Spell * FindCurrentSpellBySpellId(uint32 spell_id) const
Creature * GetVehicleCreatureBase() const
int32 CalculateSpellDamage(Unit const *target, SpellInfo const *spellProto, uint8 effect_index, int32 const *basePoints=nullptr) const
std::multimap< uint32, AuraApplication * > AuraApplicationMap
void ApplyStatBuffMod(Stats stat, float val, bool apply)
bool IsPolymorphed() const
Vehicle * GetVehicle() const
ShapeshiftForm GetShapeshiftForm() const
void SetBaseWeaponDamage(WeaponAttackType attType, WeaponDamageRange damageRange, float value)
virtual bool isBeingLoaded() const
bool IsInDisallowedMountForm() const
void SetCharm(Unit *target, bool apply)
void SendTeleportPacket(Position &pos)
bool CanDualWield() const
bool IsNonMeleeSpellCast(bool withDelayed, bool skipChanneled=false, bool skipAutorepeat=false, bool isAutoshoot=false, bool skipInstant=true) const
void SetUnitMovementFlags(uint32 f)
void CleanupsBeforeDelete(bool finalCleanup=true) override
uint32 GetMaxHealth() const
Aura * AddAura(uint32 spellId, Unit *target)
void SendMovementHover(Player *sendTo)
float m_createStats[MAX_STATS]
uint8 getRace(bool original=false) const
AuraApplicationMap & GetAppliedAuras()
void ApplyAttackTimePercentMod(WeaponAttackType att, float val, bool apply)
void StopMoving()
-------—End of Pet responses methods-------—
std::pair< AuraApplicationMap::const_iterator, AuraApplicationMap::const_iterator > AuraApplicationMapBounds
GameObject * GetGameObject(uint32 spellId) const
void SendPlaySpellVisual(uint32 id)
void SetHealth(uint32 val)
bool IsStandState() const
void SetMaxPower(Powers power, uint32 val)
bool HasStealthAura() const
uint32 GetFaction() const
bool HasAura(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, ObjectGuid itemCasterGUID=ObjectGuid::Empty, uint8 reqEffMask=0) const
Spell * GetCurrentSpell(CurrentSpellTypes spellType) const
std::map< uint8, AuraApplication * > VisibleAuraMap
void RemoveAurasWithAttribute(uint32 flags)
void SendMovementWaterWalking(Player *sendTo)
AuraEffect * GetAuraEffectDummy(uint32 spellid) const
void AddUnitState(uint32 f)
void ClearComboPointHolders()
void SetCreateMana(uint32 val)
bool IsDuringRemoveFromWorld() const
int32 GetMaxPositiveAuraModifier(AuraType auratype)
bool m_ControlledByPlayer
void RemoveAurasDueToItemSpell(uint32 spellId, ObjectGuid castItemGuid)
virtual void UpdateDamagePhysical(WeaponAttackType attType)
HostileRefMgr & getHostileRefMgr()
virtual bool SetHover(bool enable, bool packetOnly=false)
bool HandleStatModifier(UnitMods unitMod, UnitModifierType modifierType, float amount, bool apply)
void SetLevel(uint8 lvl, bool showLevelChange=true)
uint32 GetPhaseByAuras() const
AuraList & GetSingleCastAuras()
virtual bool SetCanFly(bool enable, bool packetOnly=false)
void SetResistance(SpellSchools school, int32 val)
uint32 GetNativeDisplayId() const
void AddUnitMovementFlag(uint32 f)
SafeUnitPointer m_movedByPlayer
void RemoveStandFlags(uint8 flags)
uint16 GetMaxSkillValueForLevel(Unit const *target=nullptr) const
bool HasUnitMovementFlag(uint32 f) const
uint32 GetMaxPower(Powers power) const
uint32 GetCreateHealth() const
uint32 getRaceMask() const
void UnsummonAllTotems(bool onDeath=false)
bool HasAuraState(AuraStateType flag, SpellInfo const *spellProto=nullptr, Unit const *Caster=nullptr) const
virtual bool SetFeatherFall(bool enable, bool packetOnly=false)
void SetPower(Powers power, uint32 val)
bool HasAuraType(AuraType auraType) const
void SetNativeDisplayId(uint32 modelId)
void BuildCooldownPacket(WorldPacket &data, uint8 flags, uint32 spellId, uint32 cooldown)
void RemoveAllDynObjects()
SpellCastResult CastSpell(SpellCastTargets const &targets, SpellInfo const *spellInfo, CustomSpellValues const *value, TriggerCastFlags triggerFlags=TRIGGERED_NONE, Item *castItem=nullptr, AuraEffect const *triggeredByAura=nullptr, ObjectGuid originalCaster=ObjectGuid::Empty)
void SetPhaseMask(uint32 newPhaseMask, bool update) override
uint32 GetAttackTime(WeaponAttackType att) const
TempSummon * ToTempSummon()
ObjectGuid GetCharmGUID() const
bool CanModifyStats() const
void BuildMovementPacket(ByteBuffer *data) const
virtual void SetDisplayId(uint32 modelId)
void RemoveAurasDueToSpell(uint32 spellId, ObjectGuid casterGUID=ObjectGuid::Empty, uint8 reqEffMask=0, AuraRemoveMode removeMode=AURA_REMOVE_BY_DEFAULT)
MotionMaster * GetMotionMaster()
void RemovePlayerFromVision(Player *player)
float GetCreateStat(Stats stat) const
CharmInfo * GetCharmInfo()
Unit * GetFirstControlled() const
ObjectGuid GetTransGUID() const override
void ApplyCastTimePercentMod(float val, bool apply)
bool HasUnitState(const uint32 f) const
uint32 getClassMask() const
bool IsInFeralForm() const
bool IsFriendlyTo(Unit const *unit) const
int32 GetTotalAuraModifierByMiscValue(AuraType auratype, int32 misc_value) const
ObjectGuid GetOwnerGUID() const
bool HasInvisibilityAura() const
void RemoveFromWorld() override
uint32 HasUnitTypeMask(uint32 mask) const
bool isTargetableForAttack(bool checkFakeDeath=true, Unit const *byWho=nullptr) const
float GetStat(Stats stat) const
ObjectGuid GetCharmerGUID() const
virtual bool SetDisableGravity(bool disable, bool packetOnly=false)
Powers getPowerType() const
void SetMaxHealth(uint32 val)
void RemoveAurasByType(AuraType auraType, ObjectGuid casterGUID=ObjectGuid::Empty, Aura *except=nullptr, bool negative=true, bool positive=true)
uint32 GetPower(Powers power) const
void SendMovementFeatherFall(Player *sendTo)
int32 GetTotalAuraModifier(AuraType auratype) const
std::list< AuraEffect * > AuraEffectList
void SetAttackTime(WeaponAttackType att, uint32 val)
uint32 GetCreateMana() const
void setPowerType(Powers power)
bool IsAlwaysDetectableFor(WorldObject const *seer) const override
bool IsImmunedToDamageOrSchool(SpellSchoolMask meleeSchoolMask) const
virtual void Talk(std::string_view text, ChatMsg msgType, Language language, float textRange, WorldObject const *target)
bool IsHostileTo(Unit const *unit) const
void RemoveAllMinionsByEntry(uint32 entry)
static void CalcAbsorbResist(DamageInfo &dmgInfo, bool Splited=false)
AuraEffectList const & GetAuraEffectsByType(AuraType type) const
static void DealDamageMods(Unit const *victim, uint32 &damage, uint32 *absorb)
bool HasAuraTypeWithMiscvalue(AuraType auratype, int32 miscvalue) const
float GetPPMProcChance(uint32 WeaponSpeed, float PPM, const SpellInfo *spellProto) const
virtual bool SetWaterWalking(bool enable, bool packetOnly=false)
void RemoveAllControlled(bool onDeath=false)
float GetWeaponProcChance() const
ObjectGuid GetPetGUID() const
void ExitVehicle(Position const *exitPosition=nullptr)
void CombatStopWithPets(bool includingCast=false)
static uint32 GetGameTimeMS()
What time is it? in ms.
WorldLocation(uint32 _mapId=MAPID_INVALID, float x=0.f, float y=0.f, float z=0.f, float o=0.f)
void WorldRelocate(const WorldLocation &loc)
uint32 GetPhaseMask() const
bool IsWithinDist3d(float x, float y, float z, float dist) const
std::string const & GetName() const
InstanceScript * GetInstanceScript() const
virtual bool IsNeverVisible() const
bool HasAllowedLooter(ObjectGuid guid) const
float GetTransOffsetX() const
FlaggedValuesArray32< int32, uint32, InvisibilityType, TOTAL_INVISIBILITY_TYPES > m_invisibilityDetect
uint32 GetInstanceId() const
void setActive(bool isActiveObject)
float GetDistance(const WorldObject *obj) const
float GetTransOffsetY() const
virtual void SetMap(Map *map)
float GetTransOffsetZ() const
void AddObjectToRemoveList()
Transport * GetTransport() const
void UpdatePositionData()
TempSummon * SummonCreature(uint32 id, const Position &pos, TempSummonType spwtype=TEMPSUMMON_MANUAL_DESPAWN, uint32 despwtime=0, uint32 vehId=0, SummonPropertiesEntry const *properties=nullptr) const
virtual float GetSightRange(const WorldObject *target=nullptr) const
bool IsWithinDistInMap(WorldObject const *obj, float dist2compare, bool is3D=true, bool useBoundingRadius=true) const
float GetVisibilityRange() const
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPES > m_serverSideVisibilityDetect
float GetTransOffsetO() const
MovementInfo m_movementInfo
bool IsInMap(const WorldObject *obj) const
FlaggedValuesArray32< int32, uint32, ServerSideVisibilityType, TOTAL_SERVERSIDE_VISIBILITY_TYPES > m_serverSideVisibility
void GetZoneAndAreaId(uint32 &zoneid, uint32 &areaid) const
float GetObjectSize() const
float GetDistance2d(const WorldObject *obj) const
Player session in the World.
void SendPacket(WorldPacket const *packet)
Send a packet to the client.
AccountTypes GetSecurity() const
LocaleConstant GetSessionDbLocaleIndex() const
bool PlayerLogout() const
uint32 GetCurrentVendor() const
uint32 GetRecruiterId() const
QueryCallbackProcessor & GetQueryProcessor()
void SendActivateTaxiReply(ActivateTaxiReply reply)
void SendPetitionQueryOpcode(ObjectGuid petitionguid)
uint32 GetAccountId() const
void DoLootRelease(ObjectGuid lguid)
uint32 GetLatency() const
char const * GetAcoreString(uint32 entry) const
void SendDoFlight(uint32 mountDisplayId, uint32 path, uint32 pathNode=0)
FMT_CONSTEXPR text_style bg(detail::color_type background) FMT_NOEXCEPT
static struct my_cs_file_section_st sec[]
static Bigint * diff(Bigint *a, Bigint *b, Stack_alloc *alloc)
static Bigint * mult(Bigint *a, Bigint *b, Stack_alloc *alloc)
FMT_CONSTEXPR auto find(Ptr first, Ptr last, T value, Ptr &out) -> bool
basic_string_view< char > string_view
auto arg(const Char *name, const T &arg) -> detail::named_arg< Char, T >
constexpr auto count() -> size_t
@ SMSG_PET_UPDATE_COMBO_POINTS
@ SMSG_RAID_INSTANCE_MESSAGE
@ SMSG_INSTANCE_DIFFICULTY
@ MSG_MOVE_UPDATE_CAN_FLY
@ SMSG_ITEM_REFUND_INFO_RESPONSE
@ SMSG_CROSSED_INEBRIATION_THRESHOLD
@ MSG_TALENT_WIPE_CONFIRM
@ SMSG_MOVE_GRAVITY_DISABLE
@ SMSG_QUESTGIVER_STATUS_MULTIPLE
@ SMSG_MOVE_GRAVITY_ENABLE
@ SMSG_CORPSE_RECLAIM_DELAY
@ SMSG_UPDATE_COMBO_POINTS
@ SMSG_EQUIPMENT_SET_SAVED
@ SMSG_START_MIRROR_TIMER
@ SMSG_SET_FLAT_SPELL_MODIFIER
@ SMSG_SET_PCT_SPELL_MODIFIER
@ SMSG_DURABILITY_DAMAGE_DEATH
@ SMSG_LOOT_RELEASE_RESPONSE
@ SMSG_LOGIN_SETTIMESPEED
@ SMSG_MOVE_UNSET_CAN_FLY
@ SMSG_SEND_UNLEARN_SPELLS
@ SMSG_ENVIRONMENTALDAMAGELOG
@ SMSG_EQUIPMENT_SET_LIST
@ SMSG_ITEM_REFUND_RESULT
@ SMSG_CLIENT_CONTROL_UPDATE
void LF_DYNARRAY uint idx
void error(char *msg) const
struct tm * localtime_r(const time_t *clock, struct tm *res)
bool IsGMAccount(uint32 gmlevel)
bool IsPlayerAccount(uint32 gmlevel)
uint32 GetSecurity(uint32 accountId)
uint32 GetId(std::string const &username)
float hk_honor_at_level_f(uint8 level, float multiplier=1.0f)
uint8 GetGrayLevel(uint8 pl_level)
void SendCommand_Cooldown(T *o, ObjectGuid targetGUID, const char *prefix, uint32 id, uint32 dur, uint32 maxdur)
void SendCommand_UInt32Value(T *o, ObjectGuid targetGUID, const char *prefix, uint32 t)
void SendCommand_GUID(T *o, ObjectGuid targetGUID, const char *prefix, ObjectGuid t)
bool IsDisabledFor(DisableType type, uint32 entry, Unit const *unit, uint8 flags)
static Vector3int16 floor(const Vector3 &v)
static Vector3int16 ceil(const Vector3 &v)
Unit * GetUnit(WorldObject const &, ObjectGuid const guid)
Object * GetObjectByTypeMask(WorldObject const &, ObjectGuid const guid, uint32 typemask)
Player * FindPlayerByLowGUID(ObjectGuid::LowType lowguid)
Player * FindConnectedPlayer(ObjectGuid const guid)
Pet * GetPet(WorldObject const &, ObjectGuid const guid)
Corpse * GetCorpse(WorldObject const &u, ObjectGuid const guid)
Player * FindPlayer(ObjectGuid const guid)
Creature * GetCreatureOrPetOrVehicle(WorldObject const &, ObjectGuid const)
Creature * GetCreature(WorldObject const &u, ObjectGuid const guid)
Player * GetPlayer(Map const *, ObjectGuid const guid)
std::unordered_map< std::string, Player * > MapType
remove_cvref_t< decltype(*detail::range_begin(std::declval< Range >()))> value_type
@ LFG_STATE_FINISHED_DUNGEON
@ LFG_SPELL_DUNGEON_COOLDOWN
@ LFG_GROUP_KICK_VOTES_NEEDED
#define LOG_FATAL(filterType__,...)
#define LOG_INFO(filterType__,...)
#define LOG_ERROR(filterType__,...)
#define LOG_DEBUG(filterType__,...)
uint32 urand(uint32 min, uint32 max)
bool roll_chance_f(float chance)
bool roll_chance_i(int chance)
T ApplyPct(T &base, U pct)
void ApplyPercentModFloatVar(float &var, float val, bool apply)
T CalculatePct(T base, U pct)
constexpr auto IN_MILLISECONDS
int32 SpellCategoryCooldown
BattlegroundTypeId bgTypeID
uint32 HolidayWorldStateId
std::string const & GetText(LocaleConstant locale=DEFAULT_LOCALE, uint8 gender=GENDER_MALE, bool forceGender=false) const
static void VisitWorldObjects(WorldObject const *obj, T &visitor, float radius, bool dont_load=true)
uint32 GetPetNumber() const
CommandStates GetCommandState() const
void BuildActionBar(WorldPacket *data)
CharmSpellInfo * GetCharmSpell(uint8 index)
std::vector< uint32 > taxiPath
ObjectGuid Items[EQUIPMENT_SLOT_END]
EquipmentSetUpdateState state
bool IsFriendlyTo(FactionTemplateEntry const &entry) const
struct GameObjectTemplate::@251::@256 chest
uint32 reqitemcount[MAX_ITEM_EXTENDED_COST_REQUIREMENTS]
uint32 reqitem[MAX_ITEM_EXTENDED_COST_REQUIREMENTS]
uint32 reqpersonalarenarating
bool isContainedIn(std::vector< ItemPosCount > const &vec) const
_Damage Damage[MAX_ITEM_PROTO_DAMAGES]
uint32 GetMaxStackSize() const
float ArmorDamageModifier
_Spell Spells[MAX_ITEM_PROTO_SPELLS]
uint32 RequiredReputationRank
uint32 RequiredReputationFaction
uint32 ScalingStatDistribution
_ItemStat ItemStat[MAX_ITEM_PROTO_STATS]
float GetItemLevelIncludingQuality(uint8 pLevel) const
int32 getFeralBonus(int32 extraDPS=0) const
_Socket Socket[MAX_ITEM_PROTO_SOCKETS]
void AddLooter(ObjectGuid GUID)
uint32 GetMaxSlotInLootFor(Player *player) const
LootItem * LootItemInSlot(uint32 lootslot, Player *player, QuestItem **qitem=nullptr, QuestItem **ffaitem=nullptr, QuestItem **conditem=nullptr)
QuestItemMap const & GetPlayerQuestItems() const
ObjectGuid roundRobinPlayer
void generateMoneyLoot(uint32 minAmount, uint32 maxAmount)
void NotifyQuestItemRemoved(uint8 questIndex)
bool FillLoot(uint32 lootId, LootStore const &store, Player *lootOwner, bool personal, bool noEmptyError=false, uint16 lootMode=LOOT_MODE_DEFAULT, WorldObject *lootSource=nullptr)
void NotifyItemRemoved(uint8 lootIndex)
ObjectGuid rollWinnerGUID
bool AllowedForPlayer(Player const *player, bool isGivenByMasterLooter=false, bool allowQuestLoot=true) const
const AllowedLooterSet & GetAllowedLooters() const
bool IsBattlegroundOrArena() const
bool IsBattleArena() const
bool Instanceable() const
void RemoveMovementFlag(uint32 flag)
struct MovementInfo::TransportInfo transport
PlayerCreateInfoActions action
PlayerCreateInfoSkills skills
PlayerCreateInfoSpells customSpells
PlayerCreateInfoItems item
std::string ToString() const
float GetPositionZ() const
float GetOrientation() const
void SetOrientation(float orientation)
Position GetPosition() const
Position::PositionXYZOStreamer PositionXYZOStream()
Position(float x=0, float y=0, float z=0, float o=0)
float GetPositionX() const
float GetPositionY() const
bool IsWithinBox(const Position ¢er, float xradius, float yradius, float zradius) const
void Relocate(float x, float y)
uint16 CreatureOrGOCount[QUEST_OBJECTIVES_COUNT]
AuraEffect const * ConvertAura
void SetRuneState(uint8 index, bool set=true)
RuneInfo runes[MAX_RUNES]
uint32 getArmorMod(uint32 mask) const
uint32 getDPSMod(uint32 mask) const
uint32 getFeralBonus(uint32 mask) const
uint32 getssdMultiplier(uint32 mask) const
uint32 getSpellBonus(uint32 mask) const
uint32 Value[MAX_SKILL_STEP]
uint32 EnchantmentCondition
uint32 amount[MAX_SPELL_ITEM_ENCHANTMENT_EFFECTS]
uint32 spellid[MAX_SPELL_ITEM_ENCHANTMENT_EFFECTS]
uint32 type[MAX_SPELL_ITEM_ENCHANTMENT_EFFECTS]
std::array< uint32, MAX_TALENT_RANK > RankID
VendorItem * GetItem(uint32 slot) const
uint8 GetItemCount() const
bool IsGoldRequired(ItemTemplate const *pProto) const